結果

問題 No.657 テトラナッチ数列 Easy
ユーザー twkmath
提出日時 2018-03-06 23:58:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 270 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-09-22 03:37:07
合計ジャッジ時間 1,661 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 13
権限があれば一括ダウンロードができます

ソースコード

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] = input()

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