Prashant And Sum
CodeChefOpen on judge ↗
Yesterday, $Prashant$ $Singh$ , learned a magically & logically efficient method to find the sum of the integers from $1$ to $N$. He denotes it as $sum(N)$. But today , he defined his own new method: $sum(Z , N)$, which means the operation sum applied $Z$ times: on first $N$ Natural Number, and each subsequent time to the result of the previous operation. For example, if Z = 2 and N = 3, then $s
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start