#P0040. 二进制转换十进制

二进制转换十进制

1. Description

Binary to Decimal

Write a program that reads a binary string (containing only 0s and 1s), converts it to the corresponding decimal integer, and outputs the integer.

2. Input & Output

Input:

  • A binary string (e.g., "1010")
  • Use input() for reading

Output:

  • A decimal integer
  • Use print() for output

Example

# Input: 
1010
# Output: 
10
# Input: 
1110110111
# Output: 
951