結果

問題 No.657 テトラナッチ数列 Easy
ユーザー pluto77pluto77
提出日時 2018-03-04 08:45:18
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 186 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 6,668 KB
実行使用メモリ 14,524 KB
最終ジャッジ日時 2023-09-20 17:36:23
合計ジャッジ時間 5,780 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 12 ms
5,904 KB
testcase_04 AC 201 ms
13,072 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 243 ms
14,524 KB
testcase_09 WA -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki657

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

q=int(raw_input())
for i in xrange(q):
 n=int(raw_input())
 print tet(n)[-1]
0