← All problemsSign in

Priest and magical pond

A priest likes to go to $N$ temple everyday. Each day he offers flower to some temples, but between every two temple there is a pond which multiplies the quantity of flower he has by $M$. Suppose he offers $y$ flowers in each temple and brought $x$ flowers in starting. ###Input: -T test cases -N denoting number of temples -M denoting multiple of flowers ###Output: -x- number of flowers he br

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start