题解
2025-09-08 18:41:55
发布于:广东
0阅读
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-09-08 18:41:55
发布于:广东
#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;
}
这里空空如也
提交答案之后,这里将显示提交结果~
有帮助,赞一个