1062: 最大公约数
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int m=cin.nextInt();int n=cin.nextInt();System.out.println(gcd(m,n));}public static int gcd(int a,int b){
return(a%b==0)?b:gcd(b,a%b);}
}