結果

問題 No.657 テトラナッチ数列 Easy
ユーザー iqalorieiqalorie
提出日時 2018-03-02 22:50:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 317 bytes
コンパイル時間 734 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 21,008 KB
最終ジャッジ日時 2023-09-04 05:15:54
合計ジャッジ時間 8,087 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,292 KB
testcase_01 AC 16 ms
7,868 KB
testcase_02 AC 16 ms
7,836 KB
testcase_03 AC 17 ms
7,864 KB
testcase_04 AC 463 ms
15,248 KB
testcase_05 AC 39 ms
8,432 KB
testcase_06 AC 17 ms
7,864 KB
testcase_07 AC 16 ms
7,776 KB
testcase_08 AC 547 ms
16,476 KB
testcase_09 TLE -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
t=[int(input()) for i in range(N)]
for j in range(len(t)):
    if 1<=t[j]<=3:
        print(0)
    elif t[j]==4:
        print(1)
    else:
        s=[0,0,0,1]
        for i in range(t[j]-4):
            tt=2
            tt=s[0+i]+s[1+i]+s[2+i]+s[3+i]
            s.append(tt%17)
        print(tt%17)
0