結果

問題 No.526 フィボナッチ数列の第N項をMで割った余りを求める
ユーザー aaaaaaaaaa
提出日時 2017-06-10 02:36:50
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 89 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 11,780 KB
実行使用メモリ 22,548 KB
最終ジャッジ日時 2023-10-24 04:57:31
合計ジャッジ時間 4,537 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,996 KB
testcase_01 AC 29 ms
9,996 KB
testcase_02 AC 28 ms
9,996 KB
testcase_03 AC 30 ms
9,996 KB
testcase_04 AC 28 ms
9,996 KB
testcase_05 AC 29 ms
9,996 KB
testcase_06 AC 29 ms
9,996 KB
testcase_07 AC 30 ms
9,996 KB
testcase_08 AC 33 ms
10,116 KB
testcase_09 AC 161 ms
10,856 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c=34,55,89
n,m=map(int,input().split())
for _ in [0]*(n-10):a,b,c=b,c,b+c
print(a%m)
0