ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1133. Fibonacci Sequence

olpetOdessaONU [1 2/3] A simple way to correct solution [3] // Problem 1133. Fibonacci Sequence 27 Aug 2010 12:00
If you use formula in C++, you don't need the long arithmetics. Use long double and you'll get AC.
Uzbek boy Re: A simple way to correct solution [1] // Problem 1133. Fibonacci Sequence 15 Apr 2013 16:21
i used long double,
2 4 6 29 -1000
but my answer is -6.00693e+208, is it correct or not?
you should turn off siencetific notation
My approach goes like this: lets choose a big random prime P > 10^16, and calculate F_(i+1)%P.