萌新刚学 Java 8,CE 求助
查看原帖
萌新刚学 Java 8,CE 求助
313849
mesan楼主2020/5/1 14:44
import java.util.*;  
import java.math.BigInteger;  
  
public class Main  
{  
      public static void main(String[] args)  
      {  
            Scanner cin = new Scanner(System.in) ;
            int n;
            Scanner n = new Scanner(System.in);
            while(n != 0)
            {
                BigInteger a =cin.nextBigInteger();  
                BigInteger b =cin.nextBigInteger();  
                BigInteger ans=a.gcd(b);  
                System.out.println(ans); 
                n--;
            } 
      }  
} 


2020/5/1 14:44
加载中...