結果

問題 No.2600 Avator Height
ユーザー naesiranaesira
提出日時 2024-04-01 23:25:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 576 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 78,904 KB
最終ジャッジ日時 2024-04-01 23:25:31
合計ジャッジ時間 18,356 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
62,624 KB
testcase_01 AC 531 ms
78,904 KB
testcase_02 AC 550 ms
78,904 KB
testcase_03 AC 533 ms
78,904 KB
testcase_04 AC 533 ms
78,904 KB
testcase_05 AC 523 ms
78,904 KB
testcase_06 AC 529 ms
78,904 KB
testcase_07 AC 551 ms
78,904 KB
testcase_08 AC 576 ms
78,904 KB
testcase_09 AC 564 ms
78,904 KB
testcase_10 AC 532 ms
78,904 KB
testcase_11 AC 553 ms
78,904 KB
testcase_12 AC 527 ms
78,904 KB
testcase_13 AC 562 ms
78,904 KB
testcase_14 AC 530 ms
78,904 KB
testcase_15 AC 548 ms
78,904 KB
testcase_16 AC 532 ms
78,904 KB
testcase_17 AC 552 ms
78,904 KB
testcase_18 AC 530 ms
78,904 KB
testcase_19 AC 532 ms
78,904 KB
testcase_20 AC 529 ms
78,904 KB
testcase_21 AC 533 ms
78,904 KB
testcase_22 AC 557 ms
78,904 KB
testcase_23 AC 531 ms
78,904 KB
testcase_24 AC 490 ms
78,904 KB
testcase_25 AC 524 ms
78,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
MAX_N = 2*10**5

R = [1]*(MAX_N+1)
E = [1]*(MAX_N+1)
E[2] = 3
for i in range(3, MAX_N+1):
  R[i] = (R[i-1]+R[i-2])%MOD
  E[i] = (E[i-1]+E[i-2])%MOD

for _ in range(Q := int(input())):
  N = int(input())
  print((5*R[N]**2-E[N]**2)%MOD)
0