#include <stdio.h>
int main()
{
int m = 0;
int n = 0;
int r = 0;
scanf_s("%d %d", &m, &n);
while (m % n) //循环判断条件 取模
{
r = m % n; //将余数给一个临时变量
m = n; //n的值给m
n = r; //余数给n;继续取模
}
printf("%d\n", n);
return 0;
}
09-12
1908
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-26
7万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-27
827
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)