> For the complete documentation index, see [llms.txt](https://jaywin.gitbook.io/leetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jaywin.gitbook.io/leetcode/solutions/0504-base-7.md).

# 0504. Base 7

<https://leetcode.com/problems/base-7>

## Description

Given an integer `num`, return *a string of its **base 7** representation*.

**Example 1:**

```
**Input:** num = 100
**Output:** "202"
```

**Example 2:**

```
**Input:** num = -7
**Output:** "-10"
```

**Constraints:**

* `-107 <= num <= 107`

## ac

```java
```
