Problem 69 - Fibo divisibility

Back to Problem Solutions forum

atharva p     2020-03-30 07:12:47

I suspect that there is some issue with the expected answers for this question. We are to provide index of first Fibonacci number evenly divisible by input number, after submitting the answers I observed that expected answer contains index of first DIVISIBLE number and NOT EVENLY DIVISIBLE.

For example one of the input data I got was number 6825. Expected answer was 1400 and and 1400th fibonacci number, is not evenly divisible by 6825.

Please let me know if I am incorrect and sorry for the trouble. Thanks :)

Rodion (admin)     2020-03-31 04:26:01
User avatar

Hi Friend!

As the problem is simple enough, I believe there is just some simple misunderstanding. Let's check!

For example one of the input data I got was number 6825. Expected answer was 1400 and and 1400th fibonacci number, is not evenly divisible by 6825.

Good that you proposed an example: 1400-th fibonacci number is

17108476902340227241249719513231821477382749898026920041550883749834348...
    01725093580135931503892336784149493603823152250635837136101667179088779...
    12598702649578231332536279174322031119697046232293847634906170753886426...
    96139893354058660570399927047816296952516330636633851111646387885472698683607925

and it is pretty divisible by 6825. So perhaps check that your numbering of numbers is correct (zero-based) - e.g. that 34 is 9th etc.

atharva p     2020-04-19 15:04:35

Hey, thanks for the help. I just tried again and successfully solved the problem.My code checks for Fibonacci numbers which are divisible by input number. Although the problem statement says " find the index of the first non-zero member of this list, which is evenly divisible by this M "

Can you help me out with this confusion between divisble and evenly divisble. Thanks :)

zexo     2020-04-20 05:50:14
User avatar

"Evenly divisible" means the same as "divisible". It is not about result of division to be even.

atharva p     2020-04-20 06:28:39

Hi friend,

Thanks a lot, I was thinking that it means result should be even. My bad!

Please login and solve 5 problems to be able to post at forum