Pagini recente » Cod sursa (job #2447507) | Cod sursa (job #3223401) | Cod sursa (job #1432810) | Cod sursa (job #3232026) | Cod sursa (job #1631510)
var x,i,p:int64;
function nz(x:int64):int64;
var q:int64;
begin
q:=0;
while (x <> 0) do
if x mod 10 = 0 then q:=q+1 else break;
nz:=q;
end;
procedure lire;
begin
assign(input,'fact.in');
reset(input);
read(p);
close(input);
end;
procedure ecrire(x:int64);
begin
assign(output,'fact.out');
rewrite(output);
write(x);
close(output);
end;
begin
lire;
x:=1;
for i:=1 to maxint64 do
begin
x:=x*i;
if nz(x)=p then begin ecrire(x); break; end;
end;
end.