首页 > 代码库 > HDOJ 1002 java

HDOJ 1002 java

import java.math.BigInteger;import java.util.ArrayList;import java.util.Scanner;public class Main {    public static void main(String[] args) {                    Scanner scanner= new Scanner(System.in);            int n=scanner.nextInt();            for(int i=1;i<=n;i++)            {                BigInteger a=scanner.nextBigInteger();                BigInteger b=scanner.nextBigInteger();                BigInteger c=a.add(b);                System.out.println("Case "+i+":");                System.out.println(a+" + "+b+" = "+c);                if(i!=n)                System.out.println();            }                    scanner.close();                }}

 

HDOJ 1002 java