Pagini recente » Cod sursa (job #2395315) | Cod sursa (job #1665655) | Cod sursa (job #1178694) | Cod sursa (job #288992) | Cod sursa (job #930240)
Cod sursa(job #930240)
program fact;
var
p,numar,i,temp:longint;
fin,fout:text;
gasit:boolean;
begin
assign(fin,'fact.in');
reset(fin);
read(fin,p);
close(fin);
i:=0;
while (numar<p) do
begin
i:=i+5;
temp:=i;
while temp mod 5=0 do
begin
numar:=numar+1;
temp:=temp div 5;
end;
end;
assign(fout,'fact.out');
rewrite(fout);
if p=0 then
write(fout,1)
else
write(fout,i);
close(fout);
end.