Please help identify the issue with my code for “Playing with Bits” : https://ide.codingblocks.com/s/93243. It is working for the sample input but fails on Test-case#1
Wrong Answer for TC#1
hi @Sriram-Rajan-10104264111174086
your code is producing wrong output for the following test case
3
1 1
1 10
2 15
expected output
1
17
31
your output:
1
16
30
Hi Aastha, I was missing the starting index for the computation. Thanks.
I have resolved the issue and submitted the code.