From base k to base 10
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The number n is given in the base k system. Convert number n into decimal system.
Input
Two non-negative integers k (2 ≤ k ≤ 10) and n.
Output
Print one number n in the decimal system. It is guaranteed that n is no more than 10^9
in decimal notation.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 40%