結果

問題 No.2600 Avator Height
ユーザー Carpenters-CatCarpenters-Cat
提出日時 2024-01-12 21:35:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 547 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 103,500 KB
最終ジャッジ日時 2024-01-12 21:36:02
合計ジャッジ時間 16,445 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
89,464 KB
testcase_01 AC 532 ms
103,500 KB
testcase_02 AC 545 ms
103,500 KB
testcase_03 AC 520 ms
103,500 KB
testcase_04 AC 546 ms
103,500 KB
testcase_05 AC 518 ms
103,500 KB
testcase_06 AC 547 ms
103,500 KB
testcase_07 AC 519 ms
103,500 KB
testcase_08 AC 546 ms
103,500 KB
testcase_09 AC 520 ms
103,500 KB
testcase_10 AC 519 ms
103,500 KB
testcase_11 AC 544 ms
103,500 KB
testcase_12 AC 520 ms
103,500 KB
testcase_13 AC 542 ms
103,500 KB
testcase_14 AC 520 ms
103,500 KB
testcase_15 AC 547 ms
103,500 KB
testcase_16 AC 523 ms
103,500 KB
testcase_17 AC 525 ms
103,500 KB
testcase_18 AC 517 ms
103,500 KB
testcase_19 AC 528 ms
103,500 KB
testcase_20 AC 518 ms
103,500 KB
testcase_21 AC 521 ms
103,500 KB
testcase_22 AC 547 ms
103,500 KB
testcase_23 AC 520 ms
103,500 KB
testcase_24 AC 492 ms
103,500 KB
testcase_25 AC 490 ms
103,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m = 998244353
A = [1, 1]
B = [1, 3]
for _ in range(200020) :
	A.append((A[-1] + A[-2]) % m)
	B.append((B[-1] + B[-2]) % m)
Q = int(input())
for _ in range(Q) :
	n = int(input())
	n -= 1
	print((5 * A[n] ** 2 - B[n] ** 2) % m)
0