Pagini recente » Cod sursa (job #3211540) | Cod sursa (job #3246918) | Cod sursa (job #2002890) | Cod sursa (job #3287549) | Cod sursa (job #240940)
Cod sursa(job #240940)
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.