ZOJ 2001水题

来源:互联网 发布:淘宝卖家可以改名字吗 编辑:程序博客网 时间:2024/06/05 11:53

#include<stdio.h>

int foot_tohead(int a)
{
int r=0;
while(a>0)
{
r=r*10+a%10;
a/=10;
}
return r;
}
int main()
{
int n,a,b;
scanf("%d",&n);
while(n-->0)
{
scanf("%d%d",&a,&b);
a=foot_tohead(a);
b=foot_tohead(b);
printf("%d\n",foot_tohead(a+b));
}
return 0;
}
0 0