結果

問題 No.657 テトラナッチ数列 Easy
ユーザー kimiyukikimiyuki
提出日時 2018-03-02 23:50:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 546 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 10,508 KB
実行使用メモリ 15,892 KB
最終ジャッジ日時 2023-09-04 21:30:48
合計ジャッジ時間 9,811 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 495 ms
15,744 KB
testcase_01 AC 498 ms
15,808 KB
testcase_02 AC 487 ms
15,824 KB
testcase_03 AC 491 ms
15,856 KB
testcase_04 AC 490 ms
15,828 KB
testcase_05 AC 538 ms
15,852 KB
testcase_06 AC 492 ms
15,824 KB
testcase_07 AC 489 ms
15,804 KB
testcase_08 AC 491 ms
15,744 KB
testcase_09 AC 542 ms
15,804 KB
testcase_10 AC 536 ms
15,744 KB
testcase_11 AC 537 ms
15,744 KB
testcase_12 AC 545 ms
15,892 KB
testcase_13 AC 541 ms
15,860 KB
testcase_14 AC 543 ms
15,788 KB
testcase_15 AC 546 ms
15,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
t = [ -1, 0, 0, 0, 1, ]
for i in range(5, 10 ** 6 + 100):
    t += [ sum(t[-4 :]) % 17 ]
for _ in range(int(input())):
    n = int(input())
    print(t[n])
0