Question DSA-MATH-0012
MediumWhat is the output of this code?
n, f, out = 60, 2, []
while f * f <= n:
while n % f == 0:
out.append(f)
n //= f
f += 1
if n > 1:
out.append(n)
print(out)
- A.
[4, 3, 5]
- B.
[2, 3, 5]
- C.
Sign up free to see the answer and a step-by-step explanation.