标签:华为入职练习 华为oj
#include<iostream> using namespace std; int gcd(int m, int n) { int temp = 0; if (m < n) { temp = m; m = n; n = temp; } while (0 != m%n) { temp = n; n = m%n; m = n; } return n; } int main() { int m =0, n =0; cin>>m>>n; cout<<gcd(m, n)<<endl; return 0; }
标签:华为入职练习 华为oj
原文地址:http://blog.csdn.net/xiaohanstu/article/details/42419723