HDU 1002 java处理大数太好用了

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

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

 

posted @ 2016-03-17 19:15  咸咸的告别  阅读(270)  评论(0编辑  收藏  举报