結果
問題 | No.526 フィボナッチ数列の第N項をMで割った余りを求める |
ユーザー | akitsugu777 |
提出日時 | 2019-11-25 17:36:12 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
TLE
|
実行時間 | - |
コード長 | 108 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 10,552 KB |
実行使用メモリ | 12,836 KB |
最終ジャッジ日時 | 2023-08-03 14:16:47 |
合計ジャッジ時間 | 4,234 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
12,200 KB |
testcase_01 | AC | 14 ms
7,820 KB |
testcase_02 | AC | 15 ms
7,732 KB |
testcase_03 | AC | 15 ms
7,728 KB |
testcase_04 | AC | 15 ms
7,876 KB |
testcase_05 | AC | 15 ms
7,820 KB |
testcase_06 | AC | 14 ms
7,760 KB |
testcase_07 | AC | 14 ms
7,704 KB |
testcase_08 | AC | 19 ms
7,760 KB |
testcase_09 | AC | 170 ms
8,136 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
ソースコード
N, M = map(int, input().split()) a, b, c = 0, 1, 1 for _ in range(N-1): a, b, c = b, c, b+c print(a%M)