Processing math: 100%
Register
|
Login
HOME
PROBLEMSET
ROADMAP
COMPETITION
TOPIC
RANKING
GUIDE
MASHUP
ABOUT
CONTACT
Problem
Submit
Results
Fibonacci 2 - MarisaOJ: Marisa Online Judge
Fibonacci 2
Time limit: 1000 ms
Memory limit: 256 MB
Find the
n
t
h
Fibonacci number modulo
10
9
+
7
. ### Input - A single line contains an integer
n
. ### Output - Print the
n
t
h
Fibonacci number modulo
10
9
+
7
. ### Constraints -
1
≤
n
≤
10
18
. ### Example Input:
5
Output:
5
Matrix multiplication
Fibonacci 2
Martian language 2
Hakurei Shrine 2
Number sequence
Chess
Topic
Dynamic Programming
Matrix
Rating
1500
Solution (2)
Solution