A difficult problem

Post here if you don't find any other place for your post. But please, stay on-topic: algorithms, programming or something related to this web site and its services.

Moderator: Board moderators

Post Reply
Quang
New poster
Posts: 2
Joined: Thu Dec 13, 2001 2:00 am
Location: Vietnam

Post by Quang »

Please help me solve this problem please (sorry for not being of Volume 1):
As we know about Fibonacci number:
F[n]=F[n-1]+f[n-2];
Now: Enter a number S (S can have 200 digits, this is the dificulty!).
Problem: Let present S equivalant sum of leaset numbers of Fibanacci.
Hope you respond as soon as possible!
Tran Minh Quang
FPT_APTECH
Miguel Angel
Learning poster
Posts: 60
Joined: Tue Aug 13, 2002 2:39 am
Location: Mexico

But seems simple, isn't?

Post by Miguel Angel »

Get the first 500 fibonacci numbers(think f(500) will be more than 200 digits) and then use binary search to find your number :)
:D Miguel & Marina :D
kcph007
New poster
Posts: 7
Joined: Tue Nov 26, 2002 12:13 pm

Post by kcph007 »

This is not the problem of the algorithm but computation, all you have to do is to do calculating with big numbers ( up to 200 digits).
Find the lastgest Fibo number f smaller than n and do the same problem with n-f.
Good luck
Post Reply

Return to “Other words”