結果

問題 No.657 テトラナッチ数列 Easy
ユーザー kohei2019kohei2019
提出日時 2022-03-03 01:07:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 1,187 ms
コンパイル使用メモリ 86,384 KB
実行使用メモリ 154,544 KB
最終ジャッジ日時 2023-09-23 15:22:20
合計ジャッジ時間 5,298 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
151,916 KB
testcase_01 AC 133 ms
151,620 KB
testcase_02 AC 132 ms
151,496 KB
testcase_03 AC 136 ms
151,424 KB
testcase_04 AC 133 ms
151,832 KB
testcase_05 AC 191 ms
154,292 KB
testcase_06 AC 134 ms
151,752 KB
testcase_07 AC 131 ms
151,996 KB
testcase_08 AC 135 ms
151,864 KB
testcase_09 AC 191 ms
154,544 KB
testcase_10 AC 188 ms
154,324 KB
testcase_11 AC 188 ms
154,112 KB
testcase_12 AC 188 ms
153,780 KB
testcase_13 AC 186 ms
154,248 KB
testcase_14 AC 185 ms
154,460 KB
testcase_15 AC 188 ms
154,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q = int(input())
lsT = [0,0,0,0,1]

for i in range(5,10**6+1):
    lsT.append((lsT[i-1]+lsT[i-2]+lsT[i-3]+lsT[i-4])%17)

for i in range(Q):
    n = int(input())
    print(lsT[n])
0