Back to Problem Solutions forum
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 :)
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.
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 :)
"Evenly divisible" means the same as "divisible". It is not about result of division to be even.