hdu 3953

来源:互联网 发布:数据化武道txt下载 编辑:程序博客网 时间:2024/06/10 20:21

I'll play a trick on you

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 471    Accepted Submission(s): 304


Problem Description
Please look the picture carefully. Then I'll give you two integers and your task is output the third one.
Please never doubt the picture.
 

Input
The first line is a number T(1<=T<=30), represents the number of case. The next T blocks follow each indicates a case.
Each case contains two integers A,B (1<=B<=A<=10100)
 

Output
For each case, output the number of case and the third integer.(as shown in the sample output)
 

Sample Input
399 7245 2739 18
 

Sample Output
Case 1: 27Case 2: 18Case 3: 21
Hint
If you have any idea to work out the ? and explain why but couldn't get Accepted , please email me (notonlysuccess@gmail.com), the first person will get 100RMB from me.
 

Author
NotOnlySuccess
 

Source
2011 Alibaba Programming Contest
 

Recommend
lcy
坑爹的题,有木有!有木有!!!
#include<stdio.h>#include<string.h>int main(){    int t;    int i,j;    char a[200],b[200];    int sum;    scanf("%d\n",&t);    for(i=1;i<=t;i++)    {        scanf("%s %s",a,b);        sum=0;        for(j=0;j<strlen(a);j++)        sum+=a[j]-48;        for(j=0;j<strlen(b);j++)        sum+=b[j]-48;        printf("Case %d: %d\n",i,sum);    }    return 0;}