#include
using namespace std;
#define ll long long
//#define LOCAL
int main(){
#ifdef LOCAL
freopen("data.in","r",stdin);
freopen("data.out","w",stdout);
#endif // LOCAL
ll a,b,c;
cin>>a>>b>>c;
cout<<__gcd(__gcd(a,b),c);
}
C++ 自带__gcd
下面是手写gcd
#define ll long long
ll gcd(ll a,ll b){
return !b ? a : gcd(b,a%b);
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)