結果
問題 | No.526 フィボナッチ数列の第N項をMで割った余りを求める |
ユーザー | motor_radial |
提出日時 | 2019-08-16 14:23:06 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 124 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 11,832 KB |
実行使用メモリ | 10,500 KB |
最終ジャッジ日時 | 2023-10-22 04:20:48 |
合計ジャッジ時間 | 5,604 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge10 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | OLE | - |
testcase_09 | OLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
ソースコード
N,M=map(int,input().split()) F1,F2=0,1 for i in range(2,N): Fn=F1+F2 F1=F2 F2=Fn print(F1,F2,Fn) print(Fn%M)