Logo
(追記) (追記ここまで)

26312번 - Heximal 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 (추가 시간 없음) 1024 MB235625229.885%

문제

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$.

제한

  • 0ドル ≤ N < 10^{500000}$.

예제 입력 1

1865

예제 출력 1

5

예제 입력 2

6

예제 출력 2

2

예제 입력 3

5

예제 출력 3

1

힌트

출처

ICPC > Regionals > Asia Pacific > Taiwan > Taiwan Online Programming Contest > TOPC 2022 H번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /