Question PSC-FUNC-0063
HardWhat will be printed by the following pseudocode?
Function p(Integer x, Integer n)
if (n == 0)
return 1
end if
Integer half = p(x, n / 2)
if (n mod 2 == 0)
return half * half
end if
return half * half * x
End Function
Print p(3, 13) mod 1000
- A.
387
- B.
159
- C.
Sign up free to see the answer and a step-by-step explanation.