Binary number to decimal number
Submissions: 19287   Accuracy:

49.34%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a Binary Number B, Print its decimal equivalent.

Input:
The first line of input contains an integer T denoting the number of test cases. The description of T test cases follow. Each test case contains a single Binary number B

Output:
For each testcase, in a new line, print each Decimal number in new line.

Constraints:
1 <= T <= 100
1 <= Digits in Binary <= 16

Example:
Input:
2
10001000
101100
Output:
136
44

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil
Author: Jaspreet Singh


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.