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 150014 at 2010-11-14 01:22:24 on Problem 2572
In Reply To:看不懂 Posted by:lmm333 at 2010-11-13 22:51:02
#define _CRT_SECURE_NO_WARNINGS

#include<cstdio>
#include<cstring>
#include<algorithm>

int main(){
	while(true){
		char line[25];
		scanf("%s",line);
		std::reverse(line,line+strlen(line));
		int a,b,sum;
		sscanf(line,"%d=%d+%d",&sum,&a,&b);
		printf((a+b==sum)?"True\n":"False\n");
		if(!strcmp(line,"0=0+0"))
			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