Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
493 B
1
Indexable
Never
#include<iostream>
using namespace std;	
long long sqr(long long x) {
    return x*x;
}
 
long long pow(long long a, long long b) {
    if (b == 0) return 1;
    else
        if (b % 2 == 0)
            return sqr(pow(a, b/2));
        else
            return a * (sqr(pow(a, b/2)));
}
int main(){
	long long a,b,c,d;cin>>a>>b>>c>>d;
	if(pow(a,b)==pow(c,d)){
		cout<<"bang nhau";
	}
	else if(pow(a,b)<pow(c,d)){
			cout<<"nho hon";
	}
		else {
			cout<<"lon hon";
	}
}