| ||||||||||
| 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 | |||||||||
为什么错误呢?哪位仁兄可以帮帮忙(内有代码)#define max 1000001
#include"stdio.h"
void main()
{ long n,i,j;
int a[max][2],b[max]={0};
scanf("%ld",&n);
for(i=0;i<n;i++)
{scanf("%d%d",&a[i][0],&a[i][1]);
b[i]=a[i][0]+a[i][1];}
for(i=n-1;i>0;i--)
if(b[i]>=10) {b[i-1]+=1;b[i]=b[i]%10;}
for(i=0;i<n;i++)
printf("%d",b[i]);
printf("\n");
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator