| ||||||||||
| 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 | |||||||||
各位大侠帮看看为什么RE#include<stdio.h>
#include<stdlib.h>
char a[1000005];
int n;
int run(int i)
{
int x,y,k;
if(i>n)return 0;
scanf("%d%d",&x,&y);
k=x+y+run(i+1);
a[i]=k%10+'0';
return k/10;
}
int main()
{
scanf("%d",&n);
a[n+1]=0;
run(1);
printf("%s\n",a+1);
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator