teacher_code_c/欧几里得.cpp

21 lines
348 B
C++
Raw Normal View History

//#include <iostream>
//
//using namespace std;
//
//int main() {
// int M, N;
// int m, n;
// cin >> m >> n;
// M = max(m, n);
// N = min(m, n);
// int sum = M * N;
// while (M % N != 0) {
// int tmp = N;
// N = M % N;
// M = tmp;
// }
// cout << N<<endl;
// cout << sum / N;
// return 0;
//}