| ||||||||||
| 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:Re和我这个有什么区别 为什么我的过不了In Reply To:Re和我这个有什么区别 为什么我的过不了 Posted by:wangfengtian at 2008-12-07 18:17:23 > int main()
> {
> int n,i;
> char a[1000005],b[1000005];
> scanf("%d",&n);
> getchar();
> for(i=0;i<n;i++)
> {
> scanf("%c %c",a+i,b+i);
> getchar();
> }
>
> for(i=n-1;i>=0;i--)
> {
> a[i]=j+a[i]+b[i]-48;
>
> if(a[i]>57)
> {
> a[i-1]+=1;
> a[i]=a[i]-10;
> }
>
> }
> for(i=0;i<n;i++)
> printf("%c",a[i]);
> printf("\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