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

为啥总是wa呢?

Posted by zrl at 2006-07-18 16:28:16 on Problem 2316
#include<stdio.h>
#include<string.h>
#define NULL 0
main()
{char a[10000][11];
 int i=0,j,k;
 while(gets(a[i])!=NULL)
	 i++;k=i;
 for(j=0;a[0][j]!='\0';j++)
	 for(i=1;i<k;i++)
	 {a[0][j]=a[i][j]-'0'+a[0][j];
	 while(a[0][j]>'9')a[0][j]-=10;}
	 puts(a[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