Skip to content
loading...

re: School problem from senior developer interview VIEW POST

TOP OF THREAD FULL DISCUSSION
re: There a trick you can use: last 2 and 3 digits of fibonacci repeats each 1500 terms last 4 digits repeats each 15,000 last 5 digits repeats each 1...
 

Nice idea about finding "the loop length" after which "endings" repeat :) Perhaps some other puzzle could be invented from it.

However my approach was simpler - just taking modulo by 10eX where X is amount of digits in the number we seek. Then numbers won't grow longer than this.

I suspect your and mine approaches are really two versions of the same fact, however

code of conduct - report abuse