結果

問題 No.657 テトラナッチ数列 Easy
ユーザー pochiMasahiropochiMasahiro
提出日時 2018-03-07 01:15:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
MLE  
実行時間 -
コード長 233 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 11,764 KB
実行使用メモリ 815,964 KB
最終ジャッジ日時 2023-10-22 03:44:38
合計ジャッジ時間 2,664 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
17,628 KB
testcase_01 AC 37 ms
17,628 KB
testcase_02 AC 38 ms
17,628 KB
testcase_03 AC 34 ms
17,628 KB
testcase_04 MLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

Q_num = int(input())
query = [ int(input()) for _ in range(Q_num) ]
q_max = max(query)

Ti = [0] * 1000000
Ti[3] = 1

for i in range(4, q_max):
    Ti[i] = Ti[i-4] + Ti[i-3] + Ti[i-2] + Ti[i-1]

for n in query:
    print(Ti[n-1]%17)
0