答案
2025-07-06 16:05:22
发布于:广东
12阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int f(int a,int b)
{
if(a%b==0) return b;
else return f(b,a%b);
}
int main()
{
int a,b;
cin>>a>>b;
cout<<f(a,b);
return 0;
}
这里空空如也
2025-07-06 16:05:22
发布于:广东
#include <bits/stdc++.h>
using namespace std;
int f(int a,int b)
{
if(a%b==0) return b;
else return f(b,a%b);
}
int main()
{
int a,b;
cin>>a>>b;
cout<<f(a,b);
return 0;
}
这里空空如也
提交答案之后,这里将显示提交结果~
有帮助,赞一个