原题网址:http://www.lintcode.com/zh-cn/problem/hex-conversion/
Given a decimal number n
and an integer k
, Convert decimal number n
to base-k
.
注意事项
1.0<=n<=2^31-1
, 2<=k<=16
2.Each letter over 9 is indicated in uppercase
样例
Example 1:
Given n
= 5
, k
= 2
return "101"
Example 2:
Given n
= 30
, k
= 16
return "1E"