fork(6) download
  1. def f(n):
  2. x=1,
  3. for i in range(n):x+=sum(x[-i//2:]),
  4. print(x[-1])
  5.  
  6. for n in (1,9,14,15,23):
  7. f(n)
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
1
42
1308
2605
664299