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:Re和我这个有什么区别 为什么我的过不了

Posted by ding59 at 2009-01-22 15:25:39 on Problem 2602
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:
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