fork download
  1. N=int(input())
  2. suma=0
  3. for i in range (N):
  4. x=int(input())
  5. suma+=1/x
  6. print(suma)
Success #stdin #stdout 0.07s 14212KB
stdin
4
1
2
3
4
stdout
2.083333333333333