fork download
  1. n = int(input())
  2. soma = 0
  3.  
  4. for i in range(n):
  5. soma += (i+1)/(n-i)
  6.  
  7. print(n, soma)
  8.  
Success #stdin #stdout 0.02s 9200KB
stdin
10
stdout
10 22.218650793650795