Question DSA-MATH-0015
HardWhat is the output of this code?
n, res, p = 12, 12, 2
m = n
while p * p <= m:
if m % p == 0:
while m % p == 0:
m //= p
res -= res // p
p += 1
if m > 1:
res -= res // m
print(res)
- A.
6
- B.
2
- C.
Sign up free to see the answer and a step-by-step explanation.