結果

問題 No.657 テトラナッチ数列 Easy
ユーザー htkbhtkb
提出日時 2018-04-18 23:15:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 485 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 1,039 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 17,144 KB
最終ジャッジ日時 2023-09-09 11:28:59
合計ジャッジ時間 4,719 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,812 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 15 ms
7,724 KB
testcase_03 AC 14 ms
7,804 KB
testcase_04 AC 444 ms
15,408 KB
testcase_05 AC 33 ms
8,912 KB
testcase_06 AC 14 ms
7,792 KB
testcase_07 AC 15 ms
7,796 KB
testcase_08 AC 463 ms
16,016 KB
testcase_09 AC 36 ms
9,160 KB
testcase_10 AC 39 ms
9,296 KB
testcase_11 AC 39 ms
9,280 KB
testcase_12 AC 82 ms
10,128 KB
testcase_13 AC 479 ms
17,144 KB
testcase_14 AC 482 ms
16,988 KB
testcase_15 AC 485 ms
17,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

query = [int(input()) for _ in [0]*int(input())]
a = [0, 0, 0, 0, 1]
append = a.append
for i in range(1, max(query)+1):
  append(sum(a[i:i+4])%17)
print("\n".join(map(lambda q: str(a[q]), query)))
0