All Tracks Math Number Theory Basic Number Theory-2 Problem

ZrZr
Tag(s):

Easy, Factorization, Mathematics, Number Theory

Problem
Editorial
Analytics

Link to Russian translation the problem

You are given a number N. How many zeroes does N! end on?

Input
The first line contains one integer T - number of test cases. The following T lines contain one integer each - N.

Output
For each test case output one integer per line - the answer for this question.

Constraints

  • T <= 1000
  • 0 <= N <= 1011
SAMPLE INPUT
3
9
11
20
SAMPLE OUTPUT
1
2
4
Time Limit: 1,0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: Bash, C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1, TypeScript, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

This Problem was Asked in

HackerEarth

Challenge Name

Code Monk (Number Theory - III)

OTHER PROBLEMS OF THIS CHALLENGE
Уведомления
View All Notifications

?