hdu 1002 Java 大数 加法

http://acm.hdu.edu.cn/showproblem.php?pid=1002

PE   由于最后一个CASE不须要输出空行

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

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


原文地址:https://www.cnblogs.com/mfrbuaa/p/4252505.html