I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.
Input
The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A and B. Notice that the integers are very large, that means you should not process them by using 32-bit integer. You may assume the length of each integer will not exceed 1000.
Output
For each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line is the an equation "A + B = Sum", Sum means the result of A + B. Note there are some spaces int the equation. Output a blank line between two test cases.
Sample Input(第一个数字是一共有几组数据要计算,2代表要又两组要计算)
2
1 2
112233445566778899 998877665544332211
Sample Output
Case 1:1 + 2 = 3
Case 2:112233445566778899 + 998877665544332211 = 1111111111111111110
[/fold]
003新Joseph问题
原始的Joseph问题的描述如下:有n个人围坐在一个圆桌周围,把这n个人依次编号为1,….,n.。从编号是1的人开始报数,数到第m个人出列,然后从出列的下一个人从新开始报数,数到第m个人又出列,……,如此反复直到所有的人全部出列为止。比如当n=6,m=5的时候,出列的顺序依次是5,4,6,2,3,1。 现在的问题是:假设有k个好人和k个坏人。好人的编号是1到k,坏人的编号是k+1到2k。我们希望求出m的最小值,使得最先出列的k个人都是坏人。Input仅有的一个数字是k( 0 < k < 14 )。Output使得最先出列的k个人都是坏人的m的最小值。