목차

Efficient Printing

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()