fork(1) download
  1. def func():
  2. n = 1
  3. while True:
  4. for _ in range(n):
  5. yield n;
  6. n += 1
  7.  
  8.  
  9. b = 200
  10. f = func()
  11. ls = [x for i, x in zip(range(b), f)]
  12. print(ls[b-1])
  13. print(sum(ls))
Success #stdin #stdout 0.02s 9024KB
stdin
Standard input is empty
stdout
20
2670