結果
問題 |
No.526 フィボナッチ数列の第N項をMで割った余りを求める
|
ユーザー |
|
提出日時 | 2024-05-22 22:46:37 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 151 bytes |
コンパイル時間 | 484 ms |
コンパイル使用メモリ | 82,008 KB |
実行使用メモリ | 136,832 KB |
最終ジャッジ日時 | 2024-12-20 18:34:49 |
合計ジャッジ時間 | 9,311 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 9 OLE * 3 |
ソースコード
N, M = map(int, input().split()) f1, f2 = 0, 1 for i in range(3, N + 1): f1, f2 = f2, f1 + f2 print(f1, f2) f1 %= M f2 %= M print(f2)