Practice Base 7
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given an integer num, return a string of its base 7 representation.
Source: Base 7 on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
num = 100
Output
"202"
# Example 2
Input
num = -7
Output
"-10"
Constraints
-10^7 <= num <= 10^7
Related LeetCode Problems
Practice more problems similar to Base 7.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.