Problem Description

Given base b and string s, convert to decimal. If s contains invalid digit for base, print INVALID.

Input Format

One line: b s.

Output Format

Decimal or INVALID.

Sample Test Case

Input:
2 102
Output:
INVALID

Constraints

2

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next