No.534 Fibonacci Fibonacci Number
問題文最終更新日: 2026-06-25 07:09:29
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 167
(順位表)
の他の問題:
Problem Statement
You are given an integer $n$.
Find $X = \mathrm{fib}(\mathrm{fib}(n)) \bmod 10^9+7$.
Here, $\mathrm{fib}(n)$ denotes the $n$-th Fibonacci number.
Input
n
The input satisfies $0 \le n \le 10^{18}$.
Output
X
Print a newline at the end.
Sample
Sample 1
Input
7
Output
233
$\mathrm{fib}(7) = 13$ and $\mathrm{fib}(13) = 233$.
Sample 2
Input
0
Output
0
Sample 3
Input
1000000000000000000
Output
279478839
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
tanzaku