#include<stdio.h> int gcd(int a, int b) { while (b) { int t = b; b = a % b; a = t; } return a; } int main() { int a, b ; scanf("%d%d", &a, &b); if (a >= 1 && b <= 1e+9) { int gcd(int a, int b); printf("%d\n",gcd(a, b)); } return 0; }
#include<stdio.h> int gcd(int a, int b) { while (b) { int t = b; b = a % b; a = t; } return a; } int main() { int a, b ; scanf("%d%d", &a, &b); if (a >= 1 && b <= 1e+9) { int gcd(int a, int b); printf("%d\n",gcd(a, b)); } return 0; }