結果

問題 No.657 テトラナッチ数列 Easy
コンテスト
ユーザー iqalorie
提出日時 2018-03-02 22:50:29
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
TLE  
実行時間 -
コード長 317 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 296 ms
コンパイル使用メモリ 21,280 KB
実行使用メモリ 24,476 KB
最終ジャッジ日時 2026-07-26 20:02:10
合計ジャッジ時間 7,753 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 TLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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