結果

問題 No.657 テトラナッチ数列 Easy
ユーザー pluto77pluto77
提出日時 2018-03-04 09:32:32
言語 Python2
(2.7.18)
結果
AC  
実行時間 360 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 650 ms
コンパイル使用メモリ 6,632 KB
実行使用メモリ 14,012 KB
最終ジャッジ日時 2023-09-20 19:10:33
合計ジャッジ時間 3,322 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,880 KB
testcase_01 AC 12 ms
5,864 KB
testcase_02 AC 12 ms
5,876 KB
testcase_03 AC 12 ms
6,052 KB
testcase_04 AC 314 ms
13,020 KB
testcase_05 AC 29 ms
5,916 KB
testcase_06 AC 12 ms
5,848 KB
testcase_07 AC 12 ms
5,952 KB
testcase_08 AC 342 ms
13,656 KB
testcase_09 AC 32 ms
6,100 KB
testcase_10 AC 34 ms
6,248 KB
testcase_11 AC 34 ms
6,388 KB
testcase_12 AC 65 ms
6,968 KB
testcase_13 AC 359 ms
13,860 KB
testcase_14 AC 360 ms
14,012 KB
testcase_15 AC 359 ms
13,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki657

def tet(x):
 t=[0,0,0,1]
 for i in xrange(5,x+1):
  t+=[sum(t[-4:])%17]
 return t

q=int(raw_input())
l=[int(raw_input()) for i in xrange(q)]
res=tet(max(l))
for x in l:
 print res[x-1]%17
0