結果

問題 No.526 フィボナッチ数列の第N項をMで割った余りを求める
ユーザー jamadjamad
提出日時 2017-06-12 05:38:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 129 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,852 KB
実行使用メモリ 14,552 KB
最終ジャッジ日時 2023-10-24 21:28:49
合計ジャッジ時間 4,310 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def F(x):
    if x==1:return 0
    elif x==2:return 1
    else: return F(x-1)+F(x-2)


n,m=map(int,input().split())
print(F(n)%m)
0