答案就是:两边同时套上一个log #include <bits/stdc++.h> typedef long long ll; using namespace std; int main(){ ll x,y; double a,b; scanf("%lld %lld",&x,&y); a=y*log(x); b=x*log(y); if(a>b) puts(">"); else if(a<b) puts("<"); else puts("="); }