fork download
  1. def fib()
  2. t1 = 1
  3. t2 = 1
  4. t3 = 2
  5. while (true)
  6. t3 = t2 + t1
  7. t1 = t2
  8. t2 = t3
  9. if (t3.to_s().length >= 1000)
  10. return t3
  11. end
  12. end
  13. end
  14. puts t3
Runtime error #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
Standard output is empty