Convert binary to number

can you pls provide me the code for this question, I understood the problem but I’m not ABLE TO WROTE IT IN THE FORM OF A CODE

Given a binary number ,help Von Neuman to find out its decimal representation. For eg 000111 in binary is 7 in decimal.

Input Format
The first line contains N , the number of binary numbers. Next N lines contain N integers each representing binary represenation of number.

Constraints
N<=1000 Digits in binary representation is <=16.

Output Format
N lines,each containing a decimal equivalent of the binary number.

Sample Input
4
101
1111
00110
111111
Sample Output
5
15
6
63

refer to this cod here :


please mark your doubt as resolved and rate as well :slight_smile: