Question
Get GCD in more efficient code
Code
this is 掉渣天。
public int gcd(int a, int b) {
return b == 0 ? a : gcd(b, a % b);
}
Get GCD in more efficient code
this is 掉渣天。
public int gcd(int a, int b) {
return b == 0 ? a : gcd(b, a % b);
}
Author:
Permalink: https://mar2ndx.github.io/2014/08/15/pre-2017-2014-08-15-Greatest-common-divisor/
License: Copyright (c) 2019 CC-BY-NC-4.0 LICENSE
Slogan: Do you believe in DESTINY?