编辑代码
Python代码
3.11.0
2.7.17
运行
n
=eval(input(
"请输入一个整数:"
))
s
=
0
for
i in range(
1
,n+
1
,
1
):
s
=s+i/(i+
1
)
print
(s)