I try to solve problem on uva id:10229
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1170
its givig me tle.....
i have to find fibonacci number upon mod M.
Can any tell how to do this in log(n) time?
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1170
its givig me tle.....
i have to find fibonacci number upon mod M.
Can any tell how to do this in log(n) time?