結果

問題 No.657 テトラナッチ数列 Easy
ユーザー kwnwsdnckwnwsdnc
提出日時 2018-03-06 16:27:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 206 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 11,956 KB
実行使用メモリ 17,956 KB
最終ジャッジ日時 2023-10-19 12:27:35
合計ジャッジ時間 11,266 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
14,432 KB
testcase_01 AC 32 ms
10,048 KB
testcase_02 AC 33 ms
10,048 KB
testcase_03 AC 31 ms
10,048 KB
testcase_04 AC 859 ms
17,324 KB
testcase_05 AC 57 ms
10,428 KB
testcase_06 AC 30 ms
10,048 KB
testcase_07 AC 30 ms
10,048 KB
testcase_08 AC 1,032 ms
17,956 KB
testcase_09 AC 297 ms
10,664 KB
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
N=[]
for _ in range (Q):
    N.append(int(input()))


T=[0,0,0,0,1]

i=1
while i<max(N):
    T.append((T[i]+T[i+1]+T[i+2]+T[i+3])%17)
    i+=1
    
j=0
while j<Q:
    print(T[N[j]])
    j+=1
0