Power Game
CodeChefOpen on judge ↗
Rajaswi a great Mathematician have one problem for you which says: Given a no $X$ such that $X= 2^a + 2^b +..........+2^n$ where a,b,c ... n terms are pair wise distinct(unique) . for example 19=$2^4 +2^1+2^0$ . you have to find sum of power i.e. a+b+........+n terms . ###Input: - First line will contain $T$, number of testcases. Then the testcases follow. - Each testcase contains of
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