| ||||||||||
| 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 | |||||||||
不明白为什么runtime error啊。。请各位高手帮帮忙~~int d(int a);
int a[50],b[50];
main(){
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d %d",&a[i],&b[i]);
i=0;
while(i++<n)printf("%d\n",d(d(a[i-1])+d(b[i-1])));
}
int d(int a){
int t=0,i;
while(a>0){
i=a%10;
t=t*10+i;
a/=10;
}
return t;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator