結果

問題 No.657 テトラナッチ数列 Easy
ユーザー twkmathtwkmath
提出日時 2018-03-07 00:01:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 275 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 12,112 KB
実行使用メモリ 14,564 KB
最終ジャッジ日時 2023-10-22 02:00:40
合計ジャッジ時間 3,999 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,132 KB
testcase_01 AC 31 ms
10,132 KB
testcase_02 AC 30 ms
10,132 KB
testcase_03 AC 29 ms
10,132 KB
testcase_04 RE -
testcase_05 AC 56 ms
10,516 KB
testcase_06 AC 30 ms
10,132 KB
testcase_07 AC 29 ms
10,132 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def tetra_nacci(k):
	if k<4:
		return 0
	elif k==4:
		return 1
	else:
		return tetra_nacci(k-1)+tetra_nacci(k-2)+tetra_nacci(k-3)+tetra_nacci(k-4)

q = int(input())
n_lst = [0]*q
for i in range(q):
	n_lst[i] = int(input())

for i in range(q):
	print(tetra_nacci(n_lst[i])%17)
0