test
小A买彩票
https://ac.nowcoder.com/acm/contest/5803/A
#include <iostream> #include <cstdio> #include <cstdlib> #include <string> using namespace std; int main() { string a,b; while(cin>>a>>b) { a+=a,b+=b; int la=a.length(),lb=b.length(); int len=max(la,lb),ans=0; for(int i=0;i<len&&ans==0;i++) { if(a[i%la]<b[i%lb])ans=-1; if(a[i%la]>b[i%lb])ans=1; } if(ans==0)cout<<"="<<endl; else if(ans==-1)cout<<"<"<<endl; else cout<<">"<<endl; } return 0; }