LeetCode - Algorithms - 504. Base 7

Problem

504. Base 7

Java

jdk

public static String Integer.toString(int i, int radix)

1
2
3
4
5
class Solution {
public String convertToBase7(int num) {
return Integer.toString(num, 7);
}
}

Submission Detail

  • 241 / 241 test cases passed.
  • Runtime: 0 ms, faster than 100.00% of Java online submissions for Base 7.
  • Memory Usage: 35.9 MB, less than 95.07% of Java online submissions for Base 7.