시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 (추가 시간 없음) | 1024 MB | 101 | 26 | 22 | 27.848% |
The base-6 numeral system is also called the heximal numeral system. We say a string $h_kh_{k-1} \cdots h_1h_0$ is a heximal number if $h_i ∈ \{0, 1, 2, 3, 4, 5\}$ for every $i ∈ \{0, 1, \dots , k\}$ and $h_k = 0$ implies $k = 0$. The value represented by $h_kh_{k-1} \cdots h_1h_0$ in the heximal numeral system is $\sum^{k}_{i=0}{h_i6^i}$. For example, the value of the heximal number $12345$ equals the value of the decimal number $1865 = 1 × 6^4 + 2 × 6^3 + 3 × 6^2 + 4 × 6 + 5$.
Harry asks you to convert a very large base-10 number $N$ to base-6. Since the conversion result can be very long, it is too hard for Harry to verify the result by himself. So, you just need to tell Harry the length of the conversion result. For example, if $N = 1865$, then you just need to tell Harry the length of the conversion result is $5$.
The input contains exactly one integer $N$ in decimal.
Output the length of the base-6 representation of $N$.
1865
5
6
2
5
1
ICPC > Regionals > Asia Pacific > Taiwan > Taiwan Online Programming Contest > TOPC 2022 H번