結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
11,232 KB
testcase_01 AC 9 ms
11,296 KB
testcase_02 AC 9 ms
11,312 KB
testcase_03 AC 9 ms
11,232 KB
testcase_04 AC 9 ms
11,360 KB
testcase_05 AC 20 ms
11,160 KB
testcase_06 AC 9 ms
11,232 KB
testcase_07 AC 9 ms
11,164 KB
testcase_08 AC 10 ms
11,232 KB
testcase_09 AC 21 ms
11,220 KB
testcase_10 AC 23 ms
11,024 KB
testcase_11 AC 22 ms
11,044 KB
testcase_12 AC 23 ms
11,296 KB
testcase_13 AC 23 ms
11,164 KB
testcase_14 AC 23 ms
11,340 KB
testcase_15 AC 22 ms
11,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var t: []int :: #[1000001]int
	var num: int :: 1
	do t[3] :: 1
	for i(4, 1000000)
		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