标签:
while(t--)
最后结果t=-1
#include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #include <stack> using namespace std; #define MEM(a,b) memset(a,b,sizeof(a)) #define pf printf #define sf scanf #define debug printf("!/n") #define INF 1000 #define MAX(a,b) a>b?a:b #define blank pf("\n") #define LL long long char a[10],b[10]; int main() { int i,j; while(~sf("%s",a)) { sf("%s",b); int m=0,n=0; while(a[m]==‘0‘) m++; while(b[n]==‘0‘) n++; int len1 = strlen(a)-m; int len2 = strlen(b)-n; if(len1>len2) pf(">\n"); else if(len2>len1) pf("<\n"); else { while(len1--) { if(a[m]>b[n]) { pf(">\n"); break; } else if(a[m]<b[n]) { pf("<\n"); break; } else { m++; n++; } } if(len1==-1) pf("=\n"); } } return 0; }
标签:
原文地址:http://www.cnblogs.com/qlky/p/5154460.html