首页 > 编程语言 > 详细

hdu 5050 Divided Land(JAVA高精度)

时间:2014-09-27 22:29:01      阅读:217      评论:0      收藏:0      [点我收藏+]
import java.util.Scanner;
import java.math.BigInteger;

public class Main {
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        int T;
        T=cin.nextInt();
        BigInteger a,b;
        for(int cas=1;cas<=T;cas++){
            a=cin.nextBigInteger(2);
            b=cin.nextBigInteger(2);
            a=a.gcd(b);
            System.out.println("Case #"+cas+": "+a.toString(2));
        }
    }
}

 

hdu 5050 Divided Land(JAVA高精度)

原文:http://www.cnblogs.com/wshh/p/3997322.html

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