Cod sursa(job #451072)

Utilizator autoplayerBerendea autoplayer Data 8 mai 2010 21:55:43
Problema Factorial Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.36 kb
var t : text;
    p, x, y : longint;
begin
assign(t,'txt.txt.');
reset(t);
readln(t,p);
if p=0 then x:=1;
while p<>0 do begin inc(x,5);
                    y:=x;
                    while y mod 5=0 do begin y:=y div 5;
                                             dec(p);
                                       end;
              end;
writeln(x);
end.