Given a base B and a number N in that base, increment the number by one and print the resulting number in that base only.
 
Example 1:
Input:
B = 2
N = 0010
Output:
11
Explanation:
(0010)_{2} = (2)10
2 + 1 = 3
(3)_{10} = (11)2
Example 2:
Input:
B = 13
N = 2139
Output:
231A
Explanation:
(2319)_{13} = (81)10
81 + 1 = 82
(82)_{10} = (231A)_{13}
Your Task:
You don't need to read input or print anything. Your task is to complete the function inc() which takes an integer B, a string N as input parameter and returns the string by incrementing the number by one in the same base.
 
Expected Time Complexity: O(log N)
Expected Space Complexity: O(1)
 
Constraints:
2 <= B <= 16
0000 <= N <= Max value in that base (e.g. 1111 for base 2, FFFF for base 16, etc.)