Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

各位大侠帮看看为什么RE

Posted by 314487522 at 2010-08-03 12:06:38 on Problem 2602 and last updated at 2010-08-03 12:12:10
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator