結果

問題 No.657 テトラナッチ数列 Easy
ユーザー mlihua09mlihua09
提出日時 2020-09-03 13:41:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 91,776 KB
最終ジャッジ日時 2024-05-02 21:18:24
合計ジャッジ時間 2,894 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
73,600 KB
testcase_01 AC 65 ms
73,216 KB
testcase_02 AC 65 ms
73,600 KB
testcase_03 AC 68 ms
73,600 KB
testcase_04 AC 69 ms
73,344 KB
testcase_05 AC 130 ms
91,520 KB
testcase_06 AC 67 ms
73,472 KB
testcase_07 AC 64 ms
73,600 KB
testcase_08 AC 65 ms
73,600 KB
testcase_09 AC 136 ms
91,520 KB
testcase_10 AC 136 ms
91,392 KB
testcase_11 AC 141 ms
91,392 KB
testcase_12 AC 137 ms
91,776 KB
testcase_13 AC 137 ms
91,392 KB
testcase_14 AC 136 ms
91,520 KB
testcase_15 AC 140 ms
91,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


T = [1] + [0] * 10 ** 6

for i in range(4, 10 ** 6 + 1):
    T[i] = (T[i - 1] + T[i - 2] + T[i - 3] + T[i - 4]) % 17
    
for _ in range(int(input())):
    print(T[int(input())])
0