← All problemsSign in

Samar and his Birthday

It's Samar's birthday. Samar loves Mathematics. He likes to cut his cake in such a way that size of all the pieces of the cake cut by him is a power of 2. Given the size of cake, find out the minimum number of pieces of cake Samar can cut. ###Input: - The First line will contain an integer $n$, specifying the number of test cases. $n$ test cases follow. - Each line of the test case conta

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