NC23050 华华对月月的忠诚
作者:互联网
https://ac.nowcoder.com/acm/problem/23050
最大公约数的辗转相除法
点击查看代码
#include <bits/stdc++.h>
using namespace std;
#define int long long
int gcd(int a,int b)
{
return b ? gcd(b,a%b) : a;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int a,b;string n;
cin >> a >> b >> n;
cout << gcd(a,b) << endl;
return 0;
}
标签:cout,华华,int,cin,long,NC23050,忠诚,tie,gcd 来源: https://www.cnblogs.com/beiy/p/16460098.html