結果

問題 No.657 テトラナッチ数列 Easy
ユーザー 👑 tatt61880tatt61880
提出日時 2021-03-01 19:05:52
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 2,085 ms
コンパイル使用メモリ 147,752 KB
実行使用メモリ 11,552 KB
最終ジャッジ日時 2023-10-14 17:31:38
合計ジャッジ時間 3,041 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
11,324 KB
testcase_01 AC 8 ms
11,288 KB
testcase_02 AC 8 ms
11,284 KB
testcase_03 AC 7 ms
11,220 KB
testcase_04 AC 7 ms
11,320 KB
testcase_05 AC 18 ms
11,320 KB
testcase_06 AC 8 ms
11,224 KB
testcase_07 AC 8 ms
11,432 KB
testcase_08 AC 7 ms
11,428 KB
testcase_09 AC 20 ms
11,276 KB
testcase_10 AC 20 ms
11,516 KB
testcase_11 AC 21 ms
11,552 KB
testcase_12 AC 20 ms
11,160 KB
testcase_13 AC 22 ms
11,024 KB
testcase_14 AC 22 ms
11,488 KB
testcase_15 AC 21 ms
11,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var t: []int :: #[1000000]int
	var num: int :: 1
	do t[3] :: 1
	for i(4, 999999)
		do t[i] :: (num + 17) % 17
		do num :- t[i - 4]
		do num :+ t[i]
	end for
	
	var q: int :: cui@inputInt()
	for(1, q)
		var n: int :: cui@inputInt()
		do cui@print("\{t[n - 1]}\n")
	end for
end func
0