結果

問題 No.657 テトラナッチ数列 Easy
ユーザー YutaroYamanakaYutaroYamanaka
提出日時 2018-03-08 23:59:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 234 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 19,096 KB
最終ジャッジ日時 2024-04-15 12:22:26
合計ジャッジ時間 4,286 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 35 ms
10,624 KB
testcase_04 AC 478 ms
17,644 KB
testcase_05 RE -
testcase_06 AC 34 ms
10,624 KB
testcase_07 AC 32 ms
10,752 KB
testcase_08 AC 496 ms
18,388 KB
testcase_09 AC 63 ms
11,136 KB
testcase_10 AC 68 ms
11,264 KB
testcase_11 AC 68 ms
11,264 KB
testcase_12 AC 112 ms
11,904 KB
testcase_13 AC 546 ms
19,044 KB
testcase_14 AC 550 ms
19,096 KB
testcase_15 AC 532 ms
18,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q_num = int(input())
query = [ int(input()) for _ in range(Q_num) ]
q_max = max(query)

Ti = [0] * (q_max)
Ti[3] = 1
for i in range(4, q_max):
    Ti[i] = (Ti[i-4] + Ti[i-3] + Ti[i-2] + Ti[i-1])%17

for n in query:
    print(Ti[n-1])
0