結果

問題 No.657 テトラナッチ数列 Easy
ユーザー pluto77pluto77
提出日時 2018-03-03 16:58:56
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 191 bytes
コンパイル時間 774 ms
コンパイル使用メモリ 6,680 KB
実行使用メモリ 14,532 KB
最終ジャッジ日時 2023-09-12 16:49:20
合計ジャッジ時間 5,623 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
10,512 KB
testcase_01 AC 10 ms
5,928 KB
testcase_02 AC 10 ms
5,992 KB
testcase_03 AC 10 ms
5,928 KB
testcase_04 AC 177 ms
12,996 KB
testcase_05 AC 34 ms
6,096 KB
testcase_06 AC 11 ms
5,940 KB
testcase_07 AC 11 ms
5,872 KB
testcase_08 AC 212 ms
14,532 KB
testcase_09 AC 918 ms
6,080 KB
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(x-4):
  t.append((t[-1]+t[-2]+t[-3]+t[-4])%17)
 return t[x-1]%17

q=int(raw_input())
for i in xrange(q):
 n=int(raw_input())
 print tet(n)
0