提交时间:2020-10-31 19:06:51

运行 ID: 8277

#include <bits/stdc++.h> using namespace std; int gcd(long long a,long long b) { if(a<b) { long long t=a; a=b; b=t; } while(a%b!=0) { long long t=a; a=b; b=t%b; } return b; } int main() { long long a,b; cin>>a>>b; cout<<gcd(a,b)<<endl; return 0; }