結果
| 問題 |
No.526 フィボナッチ数列の第N項をMで割った余りを求める
|
| コンテスト | |
| ユーザー |
lunaticcry
|
| 提出日時 | 2017-07-02 22:43:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 129 bytes |
| コンパイル時間 | 191 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 16,000 KB |
| 最終ジャッジ日時 | 2024-10-05 08:51:52 |
| 合計ジャッジ時間 | 3,966 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 TLE * 1 -- * 4 |
ソースコード
n, m =list(map(int ,input().split()))
f0 = 0
f1 = 1
for i in range(n-1):
temp = f1
f1 += f0
f0 = temp
print (f0%m)
lunaticcry