第一题:
import java.math.BigInteger;
import java.util.*;
 public class Main {
     private static int count = 0;
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         BigInteger n= new BigInteger(sc.nextLine());
         BigInteger m= new BigInteger(sc.nextLine());
                System.out.println(n.gcd(m));
                }
         }