Question DSA-MATH-0043
MediumWhat is the output of this code?
def egcd(a, b):
if b == 0:
return a, 1, 0
g, x, y = egcd(b, a % b)
return g, y, x - (a // b) * y
g, x, y = egcd(30, 12)
print(g, 30 * x + 12 * y)
- A.
6 0
- B.
3 6
- C.
Sign up free to see the answer and a step-by-step explanation.