[leetcode]504. Base 7
2017-02-19 09:39
387 查看
Given an integer, return its base 7 string representation.
Example 1:
Example 2:
Note:The input will be in range of [-1e7, 1e7].
Answer:
public String convertToBase7(int num) {
return Long.toString(Long.valueOf(num),7);
}
Example 1:
Input: 100 Output: "202"
Example 2:
Input: -7 Output: "-10"
Note:The input will be in range of [-1e7, 1e7].
Answer:
public String convertToBase7(int num) {
return Long.toString(Long.valueOf(num),7);
}
相关文章推荐
- leetcode 504. Base 7
- Leetcode-504. Base 7
- [leetcode]: 504. Base 7
- LeetCode 504. Base 7
- [leetcode]504. Base 7
- LeetCode-504. Base 7
- leetcode 504. Base 7
- (Leetcode)504. Base 7
- [LeetCode] 504. Base 7 ❤
- leetcode 504. Base 7 python
- [leetCode刷题笔记]504. Base 7
- 【Leetcode】504. Base 7
- LeetCode504. Base 7 我是如何解答的
- 【LeetCode】 504. Base 7
- leetcode 504. Base 7(easy)
- leetcode 504. Base 7
- leetcode 504. Base 7
- LeetCode-504. Base 7 (Java)
- LeetCode 504. Base 7
- [LeetCode]504. Base 7