結果

問題 No.658 テトラナッチ数列 Hard
ユーザー pluto77pluto77
提出日時 2018-03-04 09:46:19
言語 Python2
(2.7.18)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 6,480 KB
実行使用メモリ 6,404 KB
最終ジャッジ日時 2023-09-20 19:31:44
合計ジャッジ時間 1,168 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
5,892 KB
testcase_01 AC 13 ms
6,016 KB
testcase_02 AC 13 ms
5,960 KB
testcase_03 AC 13 ms
5,944 KB
testcase_04 AC 33 ms
6,156 KB
testcase_05 AC 33 ms
6,404 KB
testcase_06 AC 33 ms
6,208 KB
testcase_07 AC 32 ms
6,184 KB
testcase_08 AC 32 ms
6,300 KB
testcase_09 AC 33 ms
6,264 KB
testcase_10 AC 32 ms
6,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki658

def tet(x):
 t=[0,0,0,1]
 for i in xrange(5000):
  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)%4912]
0