题解:
模拟水题。
1.首先先判断他的位数。
2.如果位数相同的话,我们就可以从头道尾进行比较了,正好string类的比较方式跟这个是相同的。
/*Keep on going Never give up*/
#pragma GCC optimize(3,"Ofast","inline")
#include <bits/stdc++.h>
const int maxn = 1e6+10;
const int MaxN = 0x3f3f3f3f;
const int MinN = 0xc0c0c00c;
typedef long long ll;
const int mod = 100000000;
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
if(a.size()>b.size()) cout<<">"<<endl;
else if(a.size()==b.size()){
if(a>b) cout<<">"<<endl;
else if(a<b) cout<<"<"<<endl;
else cout<<"="<<endl;
}
else if(a.size()<b.size()) cout<<"<"<<endl;
return 0;
}

京公网安备 11010502036488号