hdu(No.1002)

注意java不要有包名(并且严格按照输出,一个换行符都不能少):

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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int T, i = 1;
        T = sc.nextInt();
        BigInteger i1, i2;
        while (true) {

            i1 = sc.nextBigInteger();
            i2 = sc.nextBigInteger();
            System.out.println("Case " + i + ":");
            if (i < T) {
                System.out.println(i1 + " + " + i2 + " = " + i1.add(i2));
                System.out.println();
            } else {
                System.out.println(i1 + " + " + i2 + " = " + i1.add(i2));
                break;
            }
            i++;
        }
    }
}

 

posted @ 2014-05-13 17:53  剑风云  阅读(145)  评论(0编辑  收藏  举报