program p567808157;
var i,n:longint;
s:real;
begin
s:=0;
readln(n);
for i:=1 to n do s:=s+1/(2*i-1);
writeln(s:0:6);
end.
我把输出保留了6位小数.
[您的采纳是我们前进的不竭动力]
var
i,n:longint;
ans:real;
begin
readln(n);
ans:=0;
for i:=1 to 2n-1 do
if i mod 2=1 then
inc(ans,1/i*2)
end.