Q 1. Problem 5 (evenly divisible) I tried the brute force method, but it took a while, so I mentioned several sites and found this code:
It is very simple, but I do not understand how the gcd function works; can someone please help me understand the logic. (I know that it returns a GCD of two numbers, but why are there so many operations?)
source share