Riddle Me this - 1 !!
CodeChefOpen on judge ↗
Riddler got a hostage. For Batman to save the hostage he must solve the problem created by him. Riddler gives batman two integers $N$ and $K$. The $N^{th}$ term is defined as - $T(N) = T(N-1) + 2*oneBits(K) + 3*zeroBits(K)$ - $T(1) = 1$ where $oneBits(K)$ is count of set bits in $K$ $zeroBits(K)$ is count of zero bits in $K$ between most significant set bit and least significant bit. Ridd
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