JAVA解题:
import java.util.*; import java.io.*; import java.math.BigInteger; public class Main{ public static void main(String[] arg){ Scanner scan = new Scanner(new BufferedInputStream(System.in)); int n = scan.nextInt(); int l = n; while(n--!=0){ BigInteger integer = new BigInteger(scan.next()); BigInteger integer2 = new BigInteger(scan.next()); System.out.println("Case " + (l-n+1) + ":"); System.out.println(integer + " + " + integer2 + " = " +integer.add(integer2)); if(n!=1){ System.out.println(); } } scan.close(); } }
时间: 2024-10-13 14:05:22