結果

問題 No.657 テトラナッチ数列 Easy
ユーザー bellangeldindonbellangeldindon
提出日時 2019-04-02 17:40:07
言語 Python2
(2.7.18)
結果
AC  
実行時間 306 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 6,700 KB
実行使用メモリ 45,456 KB
最終ジャッジ日時 2023-08-20 12:14:18
合計ジャッジ時間 5,925 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 286 ms
45,372 KB
testcase_01 AC 294 ms
45,416 KB
testcase_02 AC 287 ms
45,384 KB
testcase_03 AC 281 ms
45,452 KB
testcase_04 AC 274 ms
45,456 KB
testcase_05 AC 288 ms
45,440 KB
testcase_06 AC 284 ms
45,428 KB
testcase_07 AC 275 ms
45,300 KB
testcase_08 AC 273 ms
45,316 KB
testcase_09 AC 293 ms
45,392 KB
testcase_10 AC 299 ms
45,304 KB
testcase_11 AC 286 ms
45,304 KB
testcase_12 AC 295 ms
45,304 KB
testcase_13 AC 306 ms
45,300 KB
testcase_14 AC 295 ms
45,300 KB
testcase_15 AC 292 ms
45,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

Q = int(raw_input())
for i in range(0, Q):
	print lst[int(raw_input())-1]
0