| ps | |
|---|---|
| 링크 | acmicpc.net/… |
| 출처 | BOJ |
| 문제 번호 | 33532 |
| 문제명 | Efficient Printing |
| 레벨 | 실버 2 |
| 분류 |
정수론 |
| 시간복잡도 | O(logn) |
| 인풋사이즈 | n<=10^18 |
| 사용한 언어 | Python 3.13 |
| 제출기록 | 32412KB / 32ms |
| 최고기록 | 32ms |
| 해결날짜 | 2026/03/31 |
"""Solution code for "BOJ 33532. Efficient Printing".
- Problem link: https://www.acmicpc.net/problem/33532
- Solution link: http://www.teferi.net/ps/problems/boj/33532
Tags: [math]
"""
def main():
n = int(input())
count = 0
while n := n // 5:
count += n
print(count)
if __name__ == '__main__':
main()