提交时间:2020-10-31 19:38:50

运行 ID: 8343

#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,x,num=1; cin>>a>>b; for(int x=2;x<=a&&x<=b;){ if(a%x!=0||b%x!=0){ x++; continue; } a/=x; b/=x; num*=x; } cout<<num; return 0; }