Base 7
Given an integer num, return a string of its base 7 representation.
Example 1
Input
num = 100Output
"202"The decimal number 100 is represented as 202 in base 7.
Example 2
Input
num = -7Output
"-10"The decimal number -7 is represented as -10 in base 7.
Constraints
- -10^7 <= num <= 10^7