結果

問題 No.657 テトラナッチ数列 Easy
ユーザー MaboyMaboy
提出日時 2018-03-03 11:13:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 381 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 631 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 16,620 KB
最終ジャッジ日時 2023-09-06 00:48:09
合計ジャッジ時間 3,144 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,796 KB
testcase_01 AC 16 ms
7,836 KB
testcase_02 AC 15 ms
7,784 KB
testcase_03 AC 13 ms
7,824 KB
testcase_04 AC 327 ms
15,348 KB
testcase_05 AC 36 ms
8,504 KB
testcase_06 AC 15 ms
7,756 KB
testcase_07 AC 15 ms
7,936 KB
testcase_08 AC 351 ms
15,940 KB
testcase_09 AC 38 ms
8,748 KB
testcase_10 AC 40 ms
8,964 KB
testcase_11 AC 40 ms
8,912 KB
testcase_12 AC 71 ms
9,476 KB
testcase_13 AC 381 ms
16,620 KB
testcase_14 AC 374 ms
16,548 KB
testcase_15 AC 373 ms
16,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def t(m):
  l=[-1,0,0,0,1]
  for i in range(5,m+1):
    l+=[sum(l[-4:])%17]
  return l
q=int(input())
n=[int(input()) for i in'.'*q]
l=t(max(n))
for i in n:
  print(l[i])
0