#include<stdio.h>
int gcd(int x, int y)
{ int a;
while(y != 0)
{ a=x%y;
x=y;
y=a; }
return x; }
int main()
{ int num1,num2;
scanf("%d %d",&num1
,&num2
); printf("2つの整数の最大公約数は%d",gcd
(num1
,num2
)); return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KaW50IGdjZChpbnQgeCwgaW50IHkpCnsgICBpbnQgYTsKd2hpbGUoeSAhPSAwKQogIHsgYT14JXk7CiAgICB4PXk7CiAgICB5PWE7IH0KICAgIHJldHVybiB4OyB9CiAgIAppbnQgbWFpbigpCnsgaW50IG51bTEsbnVtMjsKc2NhbmYoIiVkICVkIiwmbnVtMSwmbnVtMik7CnByaW50ZigiMuOBpOOBruaVtOaVsOOBruacgOWkp+WFrOe0hOaVsOOBryVkIixnY2QobnVtMSxudW0yKSk7CnJldHVybiAwOwp9Cg==