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

It's a pity, but I couldn't get AC using C++ standard types ->
Posted by Eugene Nikanorov 19 Apr 2002 02:52
double (64-bits) and __int64 (which is allowed here, since timus have
MSVC++ compiler) are not enough to hold fibonacci numbers which are
generated during the computation. :(
I've got AC with Pascal, since it's extended have 80-bit precision.
The main problem in the fact that MSVC++ have not 80-bit type at all!
even long double which is 80 bit in Borland C++ is 64bit here (the
same trouble was in 1114).

But if u've got AC with C++ , feel free to send me your solution on
__my_inbox@mail.ru
Re: It's a pity, but I couldn't get AC using C++ standard types ->
Posted by WAZZAP 23 Apr 2002 15:04
There exist a solution that doesn't use such long sunbers. The only
test when you can obtyain them is when there are all the zeroes.

Another way is to use the binary-serach like algorithm