Run ID:1247

提交时间:2023-08-23 10:50:43

#include<iostream> using namespace std; int main(){ int a,b,y,temp; cin>>a>>b; if(a<b){ temp=a; a=b; b=temp; } while(1){ y=a%b; if(y==0){ cout<<b;break; } else{ a=b;b=y; } } return 0; }