【问题描述】
70044 与 113148 的最大公约数是多少?
【答案提交】
这是一道结果填空的题,你只需要算出结果后提交即可。
本题的结果为一个整数,在提交答案时只填写这个整数,填写多余的内容将无法得分。
答案:5388
题解:
#include <iostream>
using namespace std;
int gcd(int a, int b)
{
return b ? gcd(b, a % b) : a;
}
int main()
{
cout << gcd(70044, 113148) << endl;
return 0;
}
ps:和上一题太像了,出题真随意。。