yes
Time Limit: 2 seconds
Memory Limit: 1024 MB
Rating: 1600
Problem StatementOutput the $N$-th number in the Fibonacci sequence modulo $10^9+7$, where term $0$ is $0$ and term $1$ is $1$. $(0 \le N \le 10^{18})$
InputThe first line has integer $N$.
OutputOutput the answer.
Sample CasesSample Input 1: 0 Sample Output 1: 0 Sample Input 2: 1000 Sample Output 2: 517691607Explanation
https://en.wikipedia.org/wiki/Fibonacci_sequence
SourcesIanOJ Contest #1 (Div. 3) > Problem E2
Submit | Back