Euclidean Algorithm1 [Codility] Chocolates By Numbers - Euclidean Algorithm // Euclidean Algorithm // [reference] https://codility.com/media/train/10-Gcd.pdf class Solution { long GCD(long a, long b) { if (b == 0) { return a; } else { return GCD(b, a % b); } } public int solution(int N, int M) { long n = N; long m = M; if (n 2021. 8. 14. 이전 1 다음