标签:style blog http color io os ar java for
http://acm.hdu.edu.cn/showproblem.php?pid=5050
大数gcd
import java.io.* ; import java.math.* ; import java.util.* ; import java.text.* ; public class Main { public static void main(String[] args) { Scanner cin=new Scanner (new BufferedInputStream(System.in)) ; BigInteger A,B ; int t=cin.nextInt() ; for (int cas=1 ;cas<=t ;cas++) { A=cin.nextBigInteger(2) ; B=cin.nextBigInteger(2) ; System.out.print("Case #"+cas+": ") ; System.out.println(A.gcd(B).toString(2)) ; } } }
标签:style blog http color io os ar java for
原文地址:http://www.cnblogs.com/xiaohongmao/p/4008799.html