A. 练44.2 二进制转化为十进制

    Type: Default 1000ms 64MiB

练44.2 二进制转化为十进制

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

Convert a binary number to its decimal representation.

Input Format

The first line contains a positive integer nn (1n301≤n≤30), representing the length of the binary number.
The second line contains a binary number.

Output Format

An integer representing the corresponding decimal number.

Sample

5
10101
21

20251101B班作业(5)

Not Claimed
Status
Done
Problem
4
Open Since
2025-11-1 0:00
Deadline
2025-11-9 23:59
Extension
24 hour(s)