Pagini recente » Cod sursa (job #1038337) | Cod sursa (job #1591013) | Cod sursa (job #2000272) | Cod sursa (job #1919295) | Cod sursa (job #240944)
Cod sursa(job #240944)
program fact;
var p,a,b,cont,i:longint;
n:word;
f:text;
begin
assign(f,'fact.in');
reset(f);
read(f,p);
cont:=0;
n:=0;
for a:=1 to p do
begin
n:=n+1;
b:=n;
repeat
if b mod 5=0 then
begin
cont:=cont+1;
b:=b div 5
end;
until (b div 5)<>0;
if cont=0 then
cont:=1;
end;
assign(f,'fact.out');
rewrite(f);
write(f,cont);
close(f);
end.