ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Linear Data Structures: Arrays > задача:


51069 - Last Digit of a Fibonacci Number

Гость
• Вопросы к жюри (2)

Задачи раздела

• ECE - Question 1
• CEN - Question 1
• Reflektimi i pikes
• 50972 - Division
• 51135 - Class Average 1
• 51136 - Class Average 2
• 51094 - Passing the course
• Question 1
• 51069 - Last Digit of a Fibonacci...
• 51130 - Permutation of Everything
• 51073 - Campus Tours for High Sch...
• 50994 - The Most Crowded Station
• 51148 - Circles
• 51123 - Mr. Li Criteria
• 51124 - Easy Tiae words
• 51145 - Graduation Exam
• 51117 - The Most Crowded

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 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!


Для отправки решений необходимо выполнить вход.

www.contester.ru