結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
62,632 KB
testcase_01 AC 542 ms
79,044 KB
testcase_02 AC 519 ms
78,916 KB
testcase_03 AC 543 ms
79,044 KB
testcase_04 AC 520 ms
79,044 KB
testcase_05 AC 540 ms
79,044 KB
testcase_06 AC 534 ms
79,044 KB
testcase_07 AC 564 ms
79,044 KB
testcase_08 AC 528 ms
78,916 KB
testcase_09 AC 546 ms
79,044 KB
testcase_10 AC 518 ms
79,044 KB
testcase_11 AC 546 ms
79,044 KB
testcase_12 AC 531 ms
79,044 KB
testcase_13 AC 550 ms
78,916 KB
testcase_14 AC 524 ms
79,044 KB
testcase_15 AC 541 ms
79,044 KB
testcase_16 AC 523 ms
78,916 KB
testcase_17 AC 518 ms
79,044 KB
testcase_18 AC 519 ms
79,044 KB
testcase_19 AC 519 ms
78,916 KB
testcase_20 AC 534 ms
78,916 KB
testcase_21 AC 549 ms
79,044 KB
testcase_22 AC 528 ms
78,916 KB
testcase_23 AC 519 ms
79,044 KB
testcase_24 AC 468 ms
78,916 KB
testcase_25 AC 482 ms
78,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q = int(input())
P = 998244353
C = 2 * 10 ** 5 + 5
r = [0] * C
e = [0] * C
r[0] = 1
r[1] = 1
e[0] = 1
e[1] = 3
for i in range(2,C):
	r[i] = (r[i-1] + r[i-2]) % P
	e[i] = (e[i-1] + e[i-2]) % P
for _ in range(Q):
	n = int(input())
	t = 5 * r[n-1] ** 2 - e[n-1] ** 2
	print(t%P)
0