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

33532번 - Efficient Printing 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 2048 MB65444072.727%

문제

The Factorial Poster Company (FPC) prints posters that display the result of any factorial that their customers wish for. Recently, they got an order from Professor D.R. Ingenious, who wants to do an experiment with very large factorial numbers. The FPC want to be as efficient with printing as possible, and therefore they decided on a way to save paper. Since the larger factorial numbers end in a lot of zeroes, they decide to cut off this number of zeroes $z$ and replace it with "$\cdot 10^z$".

You are given the task to calculate, for every order of Prof. Ingenious, how many zeroes $z$ can be cut off from the poster, so that the FPC know how much poster paper they will save.

입력

One line containing one integer $n,ドル with 0ドル \leq n \leq 10^{18}$.

출력

One line containing one integer $z,ドル the amount of trailing zeroes of $n!$. Note that any other zeroes in the result of $n!$ do not count, see the second example.

제한

예제 입력 1

1

예제 출력 1

0

예제 입력 2

7

예제 출력 2

1

예제 입력 3

42

예제 출력 3

9

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2018 E번

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

출처

대학교 대회

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

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