提交时间:2020-10-31 19:00:49
运行 ID: 8260
#include <bits/stdc++.h> using namespace std; int gcd(int a,int b) { if(a<b) { int t=a; a=b; b=t; } while(a%b!=0) { int t=a; a=b; b=t%b; } return b; } int main() { int a,b; cin>>a>>b; cout<<gcd(a,b)<<endl; return 0; }