| Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Prepared by Arbli Troshani.
 
 
   Last Digit of a Fibonacci Number   
Your goal in this problem is to find the last digit of n-th 
Fibonacci number. Recall that Fibonacci numbers grow 
exponentially fast. For example, 
 
   F200 = 280 571 172 992 510 140 037 611 932 
  413 038 677 189 525  Question:  Given an integer n, 
find the last digit of the nth Fibonacci number 
Fn› (that is, Fn mod 10).
 Input specification  You will be given a number (n) first where n 
  is between 0 and 107.
 Output specification  Show the last digit with the given criteria.
  
| Sample Input I 
 
331
 |  
| Sample Output I 
 
9
 |  Explanation:   
 
 F331 = 66899.......186469
Note:
 A standart algorithm may not work. Slight modification needed!
 Для отправки решений необходимо выполнить вход.
 
 
 |