aya1909's blog

By aya1909, history, 3 years ago, In English

Given a range [l r] find the sum of last digits of fibonacci numbers between l and r. i.e , last(fib(l))+last(fib(l+1)) .... last(fib(r)),

where last(fib(a)) denotes last digit of ath fibonacci number.

1<=l<=r<=1e9

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Using Pisano Period for $$$base = 10$$$ then we have $$$\pi(n) = 60$$$ numbers per cycle