Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
大致是这个意思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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator