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

感谢您~~~~

Posted by tzkq at 2010-07-14 01:55:33 on Problem 2845 and last updated at 2010-07-14 02:04:52
In Reply To:感慨啊~~~~~~ Posted by:380757580 at 2008-08-23 17:20:52
//This is an use of string-reverse function.

int i, j, k, t, T;
char a[99], s[99];
main() {
	for(scanf("%d",&T);t++<T;printf("%d %s\n",t,strrev(s))){
		for(j=2;j--;)
			for(scanf("%s",s),strrev(s),i=0;s[i];i++)
				a[i]+=s[i]-48;
		for(k=i=0;i<98;a[i++]=0){
			a[i+1]+=a[i]/2;
			if(a[i]) k=i;
			s[i]=a[i]%2+48;
		}
		s[k+1]=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