結果

問題 No.2600 Avator Height
ユーザー 👑 KA37RIKA37RI
提出日時 2024-01-13 03:12:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,274 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 30,428 KB
最終ジャッジ日時 2024-01-13 03:12:59
合計ジャッジ時間 35,273 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 208 ms
30,428 KB
testcase_01 AC 1,249 ms
30,428 KB
testcase_02 AC 1,261 ms
30,428 KB
testcase_03 AC 1,255 ms
30,428 KB
testcase_04 AC 1,274 ms
30,428 KB
testcase_05 AC 1,257 ms
30,428 KB
testcase_06 AC 1,258 ms
30,428 KB
testcase_07 AC 1,259 ms
30,428 KB
testcase_08 AC 1,265 ms
30,428 KB
testcase_09 AC 1,266 ms
30,428 KB
testcase_10 AC 1,263 ms
30,428 KB
testcase_11 AC 1,255 ms
30,428 KB
testcase_12 AC 1,260 ms
30,428 KB
testcase_13 AC 1,250 ms
30,428 KB
testcase_14 AC 1,255 ms
30,428 KB
testcase_15 AC 1,246 ms
30,428 KB
testcase_16 AC 1,254 ms
30,428 KB
testcase_17 AC 1,256 ms
30,428 KB
testcase_18 AC 1,257 ms
30,428 KB
testcase_19 AC 1,258 ms
30,428 KB
testcase_20 AC 1,244 ms
30,428 KB
testcase_21 AC 1,258 ms
30,428 KB
testcase_22 AC 1,254 ms
30,428 KB
testcase_23 AC 1,261 ms
30,428 KB
testcase_24 AC 1,179 ms
30,428 KB
testcase_25 AC 1,222 ms
30,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

md = 998244353
r = [1, 1]
e = [1, 3]
for i in range(200000):
	r.append((r[-1] + r[-2]) % md)
	e.append((e[-1] + e[-2]) % md)
	
ans = [(5 * r[i] * r[i] - e[i] * e[i]) % md for i in range(len(r))]

for _ in range(int(input())):
	ni = int(input()) - 1
	print(ans[ni])
0