5484: 进制转换1

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

将一个n进制的数k转换为十进制并输出。

Input

一行,一共两个整数k ,n。
其中n为进制,k为一个n进制的正整数。

Output

一行,共一个整数,表示10进制的k

Sample Input Copy

111 2

Sample Output Copy

7

HINT

n <= 9 , k <= 10⁵