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