QOJ.ac

QOJ

Limite de temps : 5 s Limite de mémoire : 1024 MB Points totaux : 100 Hackable ✓

#5006. 六进制

Statistiques

六进制计数系统也被称为 heximal 计数系统。我们称字符串 $h_k h_{k-1} \dots h_1 h_0$ 为一个六进制数,如果对于每个 $i \in \{0, 1, \dots, k\}$ 都有 $h_i \in \{0, 1, 2, 3, 4, 5\}$,且 $h_k = 0$ 意味着 $k = 0$。在六进制计数系统中,$h_k h_{k-1} \dots h_1 h_0$ 所表示的值为 $\sum_{i=0}^{k} h_i 6^i$。例如,六进制数 $12345$ 的值等于十进制数 $1865 = 1 \times 6^4 + 2 \times 6^3 + 3 \times 6^2 + 4 \times 6 + 5$。

Harry 请你将一个非常大的十进制数 $N$ 转换为六进制。由于转换结果可能非常长,Harry 自己验证结果太困难了。因此,你只需要告诉 Harry 转换结果的长度。例如,如果 $N = 1865$,你只需要告诉 Harry 转换结果的长度为 $5$。

输入格式

输入包含一个十进制整数 $N$。

输出格式

输出 $N$ 的六进制表示的长度。

数据范围

$0 \le N < 10^{500000}$。

样例

样例输入 1

1865

样例输出 1

5

样例输入 2

6

样例输出 2

2

样例输入 3

5

样例输出 3

1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.