699
1090
2万
管理员
#include <iostream> using namespace std; int gcd(int a, int b){ if(b == 0) return a; return gcd(b, a%b); } int main() { int a, b; cin >> a >> b; cout << "The gcd of " << a << " and " << b << " is " << gcd(a, b) << endl; return 0; }
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )
GMT+8, 2024-11-1 06:53 , Processed in 0.037846 second(s), 27 queries .
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.