結果

問題 No.657 テトラナッチ数列 Easy
ユーザー akitsugu777akitsugu777
提出日時 2019-07-17 10:53:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 441 ms / 2,000 ms
コード長 161 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 15,920 KB
最終ジャッジ日時 2023-08-22 19:24:17
合計ジャッジ時間 9,176 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 396 ms
15,876 KB
testcase_01 AC 390 ms
15,780 KB
testcase_02 AC 383 ms
15,752 KB
testcase_03 AC 386 ms
15,808 KB
testcase_04 AC 386 ms
15,920 KB
testcase_05 AC 439 ms
15,808 KB
testcase_06 AC 385 ms
15,884 KB
testcase_07 AC 385 ms
15,748 KB
testcase_08 AC 387 ms
15,912 KB
testcase_09 AC 434 ms
15,752 KB
testcase_10 AC 441 ms
15,828 KB
testcase_11 AC 440 ms
15,808 KB
testcase_12 AC 436 ms
15,768 KB
testcase_13 AC 435 ms
15,768 KB
testcase_14 AC 439 ms
15,880 KB
testcase_15 AC 436 ms
15,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = [0, 0, 0, 1]
for i in range(1000000):
    t.append((t[i] + t[i+1] + t[i+2] + t[i+3]) % 17)

q = int(input())

for i in range(q):
    print(t[int(input())-1])
0