Run ID:95397

提交时间:2024-10-27 14:30:23

#include<bits/stdc++.h> using namespace std; int main(){ int n,m,c; cin>>n>>m; c=(n<m) ? n:m; while(c>0){ if(n % c == 0 && m % c==0){ break; } c--; } cout<<c<<endl; return 0; }