fork download
  1. def fib(n):
  2. a,b = 1,1
  3. for i in range(n-1):
  4. a,b = b,a+b
  5. return a
  6.  
  7. n = 10000000000
  8. m = 5
  9.  
  10. print(fib(n) % m)
Time limit exceeded #stdin #stdout 5s 10024KB
stdin
Standard input is empty
stdout
Standard output is empty