Run ID:110207

提交时间:2025-02-15 14:35:04

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,s,q; cin>>a>>s; if (a>s) { q=s; } else { q=a; } for(q=q;a+s>q;q--) if(a%q==0&&s%q==0) { cout<<q; break; } return 0; }