HDU 1002
java大数类应用。
import java.math.BigInteger;
import java.util.Scanner;
public class Main{
public static void main(String args[]) {
Scanner cin=new Scanner(System.in);
while(cin.hasNext())
{
int n=cin.nextInt();
int h=1;
while(n--!=0)
{
if(h!=1)
{
System.out.println();
}
BigInteger a=cin.nextBigInteger();
BigInteger b=cin.nextBigInteger();
BigInteger ans=a.add(b);
System.out.println("Case "+h+":");
System.out.println(a+" + "+b+" = "+ans);
h++;
}
}
}
}