def fib(n): a,b = 1,1 for i in range(n-1): a,b = b,a+b return a n = 10000000000m = 5 print(fib(n) % m)
Standard input is empty
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!