Fastest Way to calculate Nth fibonacci number modulo M

@i_am_what_i_am

Can you please share your code with us. we are more happy in learning some new stuff …

2 Likes

@i_am_what_i_am,Please share your code :slight_smile: :slight_smile:

Hello frendz …

code is updated and syncronized so that you can get AC on spoj with it … it is able to answer 61100 test cases on a rough idea. We can do some optimisation and can take it to 62000 easily . suggest some optimisation … i have one in my mind …

@i_am_what_i_am
you can try it now …

Hey guys i have applied the optimisation and boom i am able to take it to 63450 from 61100 . Think of some more optimisations .

@i_am_what_i_am
he was actually correct that this is not the fastest code for generating the answer but this may be the simplest code .

1 Like