#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int a, b;
//辗转相除法求最大公因数
int gcd (int a, int b)
{
if (b == 0) return a;
return gcd(b, a % b);
}
int main()
{
cin >> a >> b;
cout << gcd(a, b) << endl;
return 0;
}
标签:除法,return,int,辗转,include,公因数
From: https://www.cnblogs.com/fghjktgbijn/p/17426237.html