BC84 牛牛学数列2

思路:

step1:按照要求累加打印即可;

代码如下:

n = int(input())
i = 1
c = 0
while i <= n:
    c += 1/i 
    i += 1
c = c + 0.00000000000000001
print('{:.6f}'.format(c))