結果

問題 No.657 テトラナッチ数列 Easy
ユーザー 👑 KazunKazun
提出日時 2020-06-10 18:36:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 85,468 KB
最終ジャッジ日時 2023-09-05 16:13:00
合計ジャッジ時間 3,109 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
83,736 KB
testcase_01 AC 86 ms
83,776 KB
testcase_02 AC 87 ms
83,732 KB
testcase_03 AC 86 ms
83,704 KB
testcase_04 AC 87 ms
83,660 KB
testcase_05 AC 142 ms
85,456 KB
testcase_06 AC 87 ms
83,636 KB
testcase_07 AC 88 ms
83,904 KB
testcase_08 AC 85 ms
83,784 KB
testcase_09 AC 135 ms
85,192 KB
testcase_10 AC 139 ms
85,076 KB
testcase_11 AC 139 ms
85,468 KB
testcase_12 AC 143 ms
85,056 KB
testcase_13 AC 141 ms
85,080 KB
testcase_14 AC 142 ms
85,400 KB
testcase_15 AC 140 ms
84,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=[0]*(10**6+1)
T[4]=1

for t in range(5,10**6+1):
    T[t]=(T[t-1]+T[t-2]+T[t-3]+T[t-4])%17

Q=int(input())
for _ in range(Q):
    n=int(input())
    print(T[n])
0