- You are given a number n.
- You are given a base b. n is a number on base b.
- You are required to convert the number n into its corresponding value in decimal number system.
Example 1:
Input: 111001 2 Output: 57
Example 2:
Input: 1266 8 Output: 694
Constraints:
0 <= d <= 1000000000
2 <= b <= 10