boris-vlasenko

ряд1

Oct 2nd, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. n = int(input())
  2. s = 0.0
  3. ch = 0.0
  4. zn = 1
  5. for i in range(1,n+1):
  6.     ch = i*i
  7.     zn *= i
  8.     s += ch/zn
  9. print("%8.3f" % s)
Advertisement
Add Comment
Please, Sign In to add comment