Run ID:68483
提交时间:2024-03-23 14:58:55
#include <iostream> using namespace std; int CommFactor1(int m, int n); int main() { int a, b; cin >> a >> b; cout <<CommFactor1(a,b)<< endl; return 0; } int CommFactor1(int m,int n) { int tem; for (tem = m;; tem--) { if (m % tem == 0 && n % tem == 0) { break; } } return tem; }