fork(1) download
  1. def continue_fibonacci(n_minus_1, n_current):
  2. """
  3. n_minus_1: 一つ前の数字
  4. n_current: 現在の数字 (一番大きい数)
  5. """
  6. a, b = n_minus_1, n_current
  7. while True:
  8. # 次の数を計算
  9. a, b = b, a + b
  10. yield b
  11. # your code goes here
Success #stdin #stdout 0.13s 14164KB
stdin
13

stdout
Standard output is empty