/*
2011-8-18
author:BearFly1990
*/
package temp;
import java.io.BufferedInputStream;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner cin = new Scanner(new BufferedInputStream(System.in));
int n;
n = cin.nextInt();
int i = 1;
while(n-->0){
String a = cin.next();
String b = cin.next();
int tempa = 0;
int tempb = 0;
for(int j = 0; j < a.length(); j++){
tempa += (a.charAt(j)-'0');
}
for(int k = 0; k < b.length(); k++){
tempb += (b.charAt(k)-'0');
}
System.out.printf("Case %d: ", i++);
System.out.println(tempa + tempb);
}
}
}
I'll play a trick on you(2011 Alibaba Programming Contest)
最新推荐文章于 2015-10-09 12:09:27 发布