| ||||||||||
| 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 | |||||||||
Running Time error#include "stdio.h"
int main()
{
long n;
int a[100004]={0},b,c;
long i;
scanf("%ld",&n);
for(i=0;i<n;i++){
scanf("%d%d",&b,&c);
a[i]=b+c;
}
for(i=n-1;i>0;i--){
if(a[i]>9){
a[i-1]++;
a[i]%=10;
}
}
printf("%d",a[0]%10);
for(i=1;i<n;i++)
printf("%d",a[i]);
putchar('\n');
return 0;
}
帮忙看看,在下的以上程序哪里有问题?
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator