2025-04-21 20:10:45 +08:00

26 lines
333 B
C

#include <stdio.h>
struct _Pair {
int x;
int y;
};
typedef struct _Pair Pair;
Pair fun(Pair p){
Pair q;
q.x = p.y;
q.y=p.x%p.y;
if (q.y!=0){
return fun(q);
}
return q;
}
void fake_fn(){}
int main() {
Pair p;
scanf("%d %d", &p.x, &p.y);
printf("%d\n", fun(p).x);
return 0;
}