fork download
  1. # your code goes here
  2. def fib(n: int) -> None:
  3. a, b = 0, 1
  4. while a < n:
  5. print(a)
  6. a, b = b, a+b
  7.  
  8. fib(5)
Success #stdin #stdout 0.03s 9440KB
stdin
Standard input is empty
stdout
0
1
1
2
3