您的位置:首页 > 其它

CodeForces 616A(水题)

2016-01-24 01:07 260 查看
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
=='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
)
{
pf(">\n");
break;
}
else if(a[m]<b
)
{
pf("<\n");
break;
}
else
{
m++;
n++;
}
}
if(len1==-1)
pf("=\n");

}
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: