Pagini recente » Monitorul de evaluare | Cod sursa (job #609598) | Cod sursa (job #2096599) | Borderou de evaluare (job #2759421) | Cod sursa (job #30029)
Cod sursa(job #30029)
var p,x,i:longint;
f:text;
function otos(a:longint):longint;
var i:longint;
begin
i:=0;
while (a mod 5)=0 do
begin
inc(i);
a:=a div 5;
end;
otos:=i;
end;
begin
assign(f,'fact.in');
reset(f);
read(f,p);
close(f);
i:=1;
repeat
x:=x+otos(i);
inc(i);
until p=x;
dec(i);
assign(f,'fact.out');
rewrite(f);
write(f,i);
close(f);
end.