結果

問題 No.657 テトラナッチ数列 Easy
ユーザー ebiyuu1121ebiyuu1121
提出日時 2018-03-05 22:18:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 484 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 467 ms
コンパイル使用メモリ 10,488 KB
実行使用メモリ 16,196 KB
最終ジャッジ日時 2023-10-11 20:33:50
合計ジャッジ時間 8,716 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 408 ms
15,952 KB
testcase_01 AC 412 ms
15,968 KB
testcase_02 AC 413 ms
15,952 KB
testcase_03 AC 409 ms
15,968 KB
testcase_04 AC 412 ms
15,968 KB
testcase_05 AC 464 ms
16,024 KB
testcase_06 AC 414 ms
15,960 KB
testcase_07 AC 409 ms
15,944 KB
testcase_08 AC 414 ms
16,048 KB
testcase_09 AC 457 ms
16,196 KB
testcase_10 AC 464 ms
16,096 KB
testcase_11 AC 463 ms
16,016 KB
testcase_12 AC 460 ms
16,024 KB
testcase_13 AC 460 ms
16,008 KB
testcase_14 AC 484 ms
16,016 KB
testcase_15 AC 465 ms
16,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())

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

for i in range(Q):
    print(T[int(input())])
0