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)); } } }