Problem Description

Given base b (2..36) and string s (digits/letters), convert to decimal.

Input Format

One line: b s.

Output Format

One integer.

Sample Test Case

Input:
16 1A
Output:
26

Constraints

s fits in 64-bit when converted.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next