結果

問題 No.526 フィボナッチ数列の第N項をMで割った余りを求める
ユーザー matriematrie
提出日時 2020-12-13 09:55:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,648 ms / 2,000 ms
コード長 86 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 11,732 KB
実行使用メモリ 49,052 KB
最終ジャッジ日時 2023-10-20 03:37:46
合計ジャッジ時間 7,488 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,072 KB
testcase_01 AC 30 ms
10,072 KB
testcase_02 AC 29 ms
10,072 KB
testcase_03 AC 29 ms
10,072 KB
testcase_04 AC 28 ms
10,072 KB
testcase_05 AC 28 ms
10,072 KB
testcase_06 AC 30 ms
10,072 KB
testcase_07 AC 29 ms
10,072 KB
testcase_08 AC 31 ms
10,144 KB
testcase_09 AC 54 ms
10,744 KB
testcase_10 AC 260 ms
17,680 KB
testcase_11 AC 1,561 ms
49,052 KB
testcase_12 AC 1,106 ms
49,052 KB
testcase_13 AC 1,648 ms
49,052 KB
testcase_14 AC 1,442 ms
49,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
l=[0]*(n-1)
f,f1=0,1
for _ in l: f,f1=(f+f1)%m,f
print(f)
0