結果

問題 No.2600 Avator Height
ユーザー なえしらなえしら
提出日時 2024-01-12 22:13:45
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 286 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 81,408 KB
最終ジャッジ日時 2024-09-27 22:40:59
合計ジャッジ時間 6,931 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
60,928 KB
testcase_01 AC 172 ms
81,408 KB
testcase_02 AC 162 ms
80,896 KB
testcase_03 AC 164 ms
81,024 KB
testcase_04 AC 167 ms
81,024 KB
testcase_05 AC 163 ms
81,280 KB
testcase_06 AC 164 ms
81,280 KB
testcase_07 AC 165 ms
81,024 KB
testcase_08 AC 165 ms
80,768 KB
testcase_09 AC 162 ms
81,152 KB
testcase_10 AC 176 ms
80,768 KB
testcase_11 AC 165 ms
80,768 KB
testcase_12 AC 171 ms
81,152 KB
testcase_13 AC 169 ms
81,408 KB
testcase_14 AC 166 ms
81,152 KB
testcase_15 AC 167 ms
81,280 KB
testcase_16 AC 172 ms
81,280 KB
testcase_17 AC 172 ms
80,896 KB
testcase_18 AC 172 ms
81,024 KB
testcase_19 AC 166 ms
80,896 KB
testcase_20 AC 172 ms
81,152 KB
testcase_21 AC 165 ms
81,152 KB
testcase_22 AC 172 ms
81,152 KB
testcase_23 AC 167 ms
80,896 KB
testcase_24 RE -
testcase_25 AC 160 ms
81,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

Q = int(input())
N = [int(input()) for _ in range(Q)]

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

for n in N:
  print((5*R[n]**2 - E[n]**2) % MOD)
0