BearCola
7/24/2017 - 11:23 PM

gcd (1-1 28:04)

gcd (1-1 28:04)

public static double gcd(int m, int n) {
  if (m < n) {
    int tmp = m;
    m = n;
    n = tmp;
  }
  
  if (m % n == 0) {
    return n;
  } else {
    return gcd(n, m % n);
  }
}