首页 > 其他 > 详细

A+B Problem II

时间:2015-02-08 21:50:03      阅读:287      评论:0      收藏:0      [点我收藏+]

问题陈述:

  杭州电子科技大学 HANGZHOU DIANZI UNIVERSITY Online Judge Problem - 1002

 

代码详解(Java):  

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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(new BufferedInputStream(System.in));
        int t, id = 0;
        BigInteger a, b, c;
        t = sc.nextInt();
        while(t-- > 0) {
            id++;
            a = sc.nextBigInteger();
            b = sc.nextBigInteger();
            c = a.add(b);
            System.out.println("Case " + id + ":");
            System.out.println(a + " + " + b + " = " + c);
            if(t != 0) {
                System.out.println("");
            }
        }
        sc.close();
    }
}

 

转载请注明出处:http://www.cnblogs.com/michaelwong/p/4280526.html

A+B Problem II

原文:http://www.cnblogs.com/michaelwong/p/4280526.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!