| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
各位老大帮帮忙 哪错了#include<stdio.h>
int f(int x);
int main()
{
int n,a,b;
scanf("%d",&n);
while(n)
{
scanf("%d%d",&a,&b);
a=f(a);b=f(b);
a=a+b;
a=f(a);
printf("%d\n",a);
n--;
}
return 1;
}
int f(int x)
{
int a=x,t=1,i,j;
for(i=0;a;i++)
{a=a/10;t*=10;}
a=0;
for(j=0;j<i;j++)
{a=x%10*t/10+a;t/=10;x/=10;}
return a;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator