問題一覧 > 通常問題

No.534 Fibonacci Fibonacci Number

レベル : / AI推定難易度 : 1700 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 73
作問者 : kimiyuki / テスター : tanzaku
お気に入りにしたユーザー ProblemId : 1481 / 自分の提出
問題文最終更新日: 2026-06-25 07:09:29
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もしくは右上の雲マークをクリックしてアカウントを作成してください。