結果

問題 No.657 テトラナッチ数列 Easy
ユーザー DexctersuDexctersu
提出日時 2018-03-19 23:50:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 471 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 16,676 KB
最終ジャッジ日時 2023-09-02 14:24:13
合計ジャッジ時間 9,109 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 435 ms
15,720 KB
testcase_01 AC 425 ms
15,628 KB
testcase_02 AC 432 ms
15,840 KB
testcase_03 AC 430 ms
15,860 KB
testcase_04 AC 437 ms
15,680 KB
testcase_05 AC 459 ms
16,276 KB
testcase_06 AC 429 ms
15,708 KB
testcase_07 AC 427 ms
15,844 KB
testcase_08 AC 431 ms
15,696 KB
testcase_09 AC 465 ms
16,440 KB
testcase_10 AC 471 ms
16,544 KB
testcase_11 AC 443 ms
16,676 KB
testcase_12 AC 449 ms
16,620 KB
testcase_13 AC 449 ms
16,616 KB
testcase_14 AC 465 ms
16,536 KB
testcase_15 AC 463 ms
16,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

q=int(input())
n=[int(input())for i in range(q)]
a=10**6
t=[0]*a
t[3]=1
for i in range(4,a):
    t[i]=(t[i-4]+t[i-3]+t[i-2]+t[i-1])%17
for j in n:
    print(t[j-1])
0