← All problemsSign in

Bits Please

Problem description. Entrepreneur Ekta gives Dwij a requirement for an array of integers. Dwij has to create the elements by using binary '1's and '0's. Dwij has an infinte supply of '0's and his friend Sanchit provides him with k '1's. Find out the number of extra '1' bits that Dwij will require to create the array. Input First line contains t, the number of test cases, 2*T lines follow. 1st

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