递龟
def f(n): if n == 1: return 1 return 1/n + f(n-1) n = int(input()) print(f'{f(n):.6f}')
normal
n = int(input()) sum = 0 for i in range(1,n+1): sum += 1/i print(f'{sum:.6f}')