結果

問題 No.2600 Avator Height
ユーザー shobonvipshobonvip
提出日時 2024-01-13 17:24:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 564 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 117,812 KB
最終ジャッジ日時 2024-01-13 17:24:51
合計ジャッジ時間 16,854 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
103,544 KB
testcase_01 AC 523 ms
117,808 KB
testcase_02 AC 555 ms
117,808 KB
testcase_03 AC 528 ms
117,808 KB
testcase_04 AC 545 ms
117,808 KB
testcase_05 AC 521 ms
117,808 KB
testcase_06 AC 564 ms
117,804 KB
testcase_07 AC 522 ms
117,808 KB
testcase_08 AC 549 ms
117,808 KB
testcase_09 AC 528 ms
117,808 KB
testcase_10 AC 560 ms
117,808 KB
testcase_11 AC 522 ms
117,808 KB
testcase_12 AC 530 ms
117,808 KB
testcase_13 AC 533 ms
117,808 KB
testcase_14 AC 532 ms
117,808 KB
testcase_15 AC 543 ms
117,808 KB
testcase_16 AC 520 ms
117,808 KB
testcase_17 AC 552 ms
117,808 KB
testcase_18 AC 519 ms
117,808 KB
testcase_19 AC 541 ms
117,808 KB
testcase_20 AC 515 ms
117,808 KB
testcase_21 AC 542 ms
117,808 KB
testcase_22 AC 520 ms
117,808 KB
testcase_23 AC 555 ms
117,808 KB
testcase_24 AC 468 ms
117,812 KB
testcase_25 AC 521 ms
117,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353

r = [0, 1, 1]
e = [0, 1, 3]

for i in range(300000):
	r.append((r[-1] + r[-2]) % mod)
	e.append((e[-1] + e[-2]) % mod)

q = int(input())
for _ in range(q):
	n = int(input())
	print((5 * r[n] * r[n] - e[n] * e[n]) % mod)
0