Whats wrong here, i compared it with the editorial code and it performs same function as my code does
@Kamyanagpal,
Your code is correct. A little modification is required.
Sample input:
4
101
1111
00110
111111
Here 4 is number of inputs you need to take for this question. So, start a for loop till 4 and print the decimal values for all these inputs. Also, for taking input I suggest you use long instead of int.
Also, you are share your code through: https://ide.codingblocks.com/
steps to share your code:
- select the correct language.
- past your code and press ctrl+s and click on save.
- share the link
