N=int(input())suma=0for i in range (N): x=int(input()) suma+=1/xprint(suma)
4 1 2 3 4
2.083333333333333
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!