結果

問題 No.657 テトラナッチ数列 Easy
ユーザー 👑 rin204rin204
提出日時 2022-01-19 20:56:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 176 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 150,912 KB
最終ジャッジ日時 2024-05-02 19:57:50
合計ジャッジ時間 3,241 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
133,504 KB
testcase_01 AC 109 ms
133,888 KB
testcase_02 WA -
testcase_03 AC 113 ms
133,632 KB
testcase_04 WA -
testcase_05 AC 172 ms
150,784 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 17
T = [0, 0, 0, 1]
for _ in range(10 ** 6):
    T.append((T[-1] + T[-2] + T[-3] + T[-4]) % MOD)

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