fork(1) download
  1. # Sn calculator
  2. import math
  3. n = 100000
  4. S = 0
  5. def function(x):
  6. return(1/(x))
  7. for i in range(2, n):
  8. S += function(i)
  9. print(S)
Success #stdin #stdout 0.1s 14120KB
stdin
Standard input is empty
stdout
11.090136129863371