Chef and wild
CodeChefOpen on judge ↗
Chef is a famous mathematician of Chefland. One day his friend asked him to solve a problem but he is busy with his current work. He asked you to solve the problem for him. Problem is, you need to calculate the value of number in a range $L$ to $R$ by following formula- - For $ith$ number in range $L$ to $R$ inclusive - $f(i)$ = $1$ when $i$ = $0$ - $f(i)$ = $5$ when $i$ = $1$ - $f(i) = 2f(i-
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