알고리즘/이론 및 팁
최대 공약수
김어찐
2021. 9. 5. 13:44
728x90
public static int gcd(int a, int b) {
while(b!=0){
int r = a%b;
a= b;
b= r;
}
return a;
}728x90