結果

問題 No.526 フィボナッチ数列の第N項をMで割った余りを求める
ユーザー S6136OS6136O
提出日時 2017-09-21 23:49:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 103 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 44,420 KB
最終ジャッジ日時 2024-04-26 06:44:11
合計ジャッジ時間 8,484 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 499 ms
44,140 KB
testcase_01 AC 490 ms
44,152 KB
testcase_02 AC 498 ms
44,140 KB
testcase_03 AC 500 ms
43,880 KB
testcase_04 AC 487 ms
44,016 KB
testcase_05 AC 489 ms
44,156 KB
testcase_06 WA -
testcase_07 AC 486 ms
43,900 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 482 ms
43,904 KB
testcase_13 WA -
testcase_14 AC 490 ms
44,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy
n, m = map(int, input().split())
x = numpy.matrix('1 1 ; 1 0')
print(((x**n) % m).item(3))
0