递归:
int f(int m, int n) { return n == 0 ? m : f(n, m % n); }非递归:
int f(int m, int n) { int r = n; do { n = r; r = m % n; m = n; } while (r > 0); return n; }
递归:
int f(int m, int n) { return n == 0 ? m : f(n, m % n); }非递归:
int f(int m, int n) { int r = n; do { n = r; r = m % n; m = n; } while (r > 0); return n; }