← All problemsSign in

Venkatesh is bored

Venkatesh is getting bored in his room. So he started playing some terrible mobile moba game. Irrelevant to him, here is the problem that you have to solve : $ F(X) = \left\{ \begin{array}{lr} F(\text{number of } 1 \text{'s in the binary representation of }X) + 1 & \text{if } X \neq 1 \\ 0 & \text{if } X=1 \end{array} \right. $ You are given $T$ test cases. In each test case, given some 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.

voice by Sarvam AI

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

Sign in to start