Run ID:72668

提交时间:2024-05-12 14:22:01

#include<iostream> using namespace std; int main(){ int a,b,gcd,c; cin>>a>>b; if(a<b){ c=a; a=b; b=c; } gcd=a%b; while (gcd!=0){ a=b; b=gcd; gcd=a%b; } cout<<b; return 0; }