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

A simple way to correct solution
Posted by olpetOdessaONU [1 2/3] 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.
Re: A simple way to correct solution
Posted by Uzbek boy 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?
Re: A simple way to correct solution
Posted by aybek 17 Aug 2014 19:40
you should turn off siencetific notation
Re: A simple way to correct solution
Posted by A_Le_K 18 Feb 2015 14:27
My approach goes like this: lets choose a big random prime P > 10^16, and calculate F_(i+1)%P.