天天看點

HDOJ 1002 A + B Problem II(大數)

HDACM1002

import java.math.BigInteger;
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for (int i = ; i < t; i++) {
            if (i>) {
                System.out.println();
            }
            BigInteger A = sc.nextBigInteger();
            BigInteger B = sc.nextBigInteger();
            System.out.println("Case "+(i+)+":");
            System.out.println(A+" + "+B+" = "+A.add(B));
        }
    }
}