1 Star 0 Fork 0

徐长贺/Leetcode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
_504.java 437 Bytes
一键复制 编辑 原始数据 按行查看 历史
Fisher Coder 提交于 6年前 . refactor 504
package com.fishercoder.solutions;
/**
* 504. Base 7
*
* Given an integer, return its base 7 string representation.
Example 1:
Input: 100
Output: "202"
Example 2:
Input: -7
Output: "-10"
Note: The input will be in range of [-1e7, 1e7].
*/
public class _504 {
public static class Solution1 {
public String convertToBase7(int num) {
return String.valueOf(Integer.toString(num, 7));
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/isulong/Leetcode.git
git@gitee.com:isulong/Leetcode.git
isulong
Leetcode
Leetcode
master

搜索帮助