Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

FACTZERO - Zeros of factorial

Dla danej liczby n wypisz liczbę zer kończących n! (czyli silnii z n).

Input

W pierwszej linii znajduje się liczba testów t (t<2001).

Każda z t linii zawiera liczbę n (0<=n<=10^9).

Output

Dla każdego testu wypisz jedną liczbę będącą liczbą zer kończących n!.

Przykład

Wejście:
2
10
1000000
Wyjście:
2
249998

Specjalne podziękowania dla Rafała Spręgi za pomysł na zadanie.


Added by:Piotr Kąkol
Date:2009-12-26
Time limit:6.466s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS OBJC SCM qobi VB.NET

hide comments
2018-08-21 16:38:50
ranking page is not working???
2014-12-04 00:40:15 Piotr KÄ…kol
NZEC is very general for Perl, Python and similar languages. It doesn't help much unfortunately.
In your case:
Can't take log of 0 at prog.pl line 1, <> chunk 1.
2014-12-03 21:22:20 Kurt Schwind
I'm getting NZEC for my perl solution. I know all hardware is different but I'm running 1000 9 digit numbers through in under 20ms. And I'm not printing out any real numbers. All int.

Solution : 13049814

Last edit: 2014-12-04 00:39:21
2013-08-12 16:20:15 Robert Gerbicz
First solution in brainfuck! It took only 0.14 sec. and 1472 bytes of code.
2010-04-17 15:39:57 Piotr KÄ…kol
Test changed and submissions rejudged.
Now in free time I'll change some other tests like numerix asked in comment. But my top priority is to make as many tasks as possible in order to encourage more contestants and not make You all bored so maybe I'll add some tasks before complying numerix's request. ;-)
2010-04-11 10:37:28 Piotr KÄ…kol
For 5*10^9 the answer should be 1249999999998 ;-)
I will change tests with max 10^9.


Last edit: 2010-04-11 10:40:55
2010-04-11 09:07:32 Zoltán Zámbori
5 sec timeout is not enough. Let it be 20 :-)

At home the same factzero solution print 1_249_999_999_997
(input: 5_000_000_000_000) in less than 0.3 sec on my old laptop. Something must be wrong with the installed Perl.

Last edit: 2010-04-11 09:21:53
2010-04-10 21:03:17 Piotr KÄ…kol
Send me something and I will send You Your code but changed to receive not TLE but WA.

Last edit: 2012-04-26 17:35:29
2010-04-10 18:43:54 Zoltán Zámbori
I give up. I have no idea why i get "time limit exceeded". Can You check this: 3491420?

It is very frustrating that i cant post any solution to bigmath problems because of "time limit..." :-(
2010-04-10 17:30:12 Piotr KÄ…kol
n<=10^9 is enough?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.