#include<iostream>
using namespace std;
int gcd(int m, int n)
{
int r;
h:
r = m - floor(m / n) * n;
if (r == 0)
{
return n;
}
else
{
m = n;
n = r;
goto h;
}
}
int main()
{
int x, y;
cin >> x >> y;
int result=gcd(x, y);
cout << "the result is:" << result << endl;
return 0;
}
022.欧几里得算法
最新推荐文章于 2025-07-17 09:58:22 发布
315

被折叠的 条评论
为什么被折叠?



