第1个回答 推荐于2017-09-30
var
s:real;
n:longint;
function jc(x:longint):longint;
var
i:longint;
begin
jc:=1;
for i:=2 to x do
jc:=jc*i;
end;
function sum:real;
var
i:longint;
begin
sum:=0;
for i:=1 to n do
sum:=sum+1/js(i);
end;
begin
readln(n);
s:=sum;
writeln(s);
end.本回答被提问者采纳