結果

問題 No.2600 Avator Height
ユーザー naesiranaesira
提出日時 2024-01-12 22:13:45
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 286 bytes
コンパイル時間 606 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 81,072 KB
最終ジャッジ日時 2024-01-12 22:14:17
合計ジャッジ時間 8,083 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
62,632 KB
testcase_01 AC 182 ms
81,072 KB
testcase_02 AC 214 ms
81,072 KB
testcase_03 AC 184 ms
81,072 KB
testcase_04 AC 185 ms
81,072 KB
testcase_05 AC 185 ms
81,072 KB
testcase_06 AC 187 ms
81,072 KB
testcase_07 AC 185 ms
81,072 KB
testcase_08 AC 191 ms
81,072 KB
testcase_09 AC 185 ms
81,072 KB
testcase_10 AC 187 ms
81,072 KB
testcase_11 AC 187 ms
81,072 KB
testcase_12 AC 188 ms
81,072 KB
testcase_13 AC 218 ms
80,816 KB
testcase_14 AC 190 ms
81,072 KB
testcase_15 AC 188 ms
81,072 KB
testcase_16 AC 184 ms
81,072 KB
testcase_17 AC 186 ms
81,072 KB
testcase_18 AC 191 ms
80,944 KB
testcase_19 AC 184 ms
81,072 KB
testcase_20 AC 185 ms
81,072 KB
testcase_21 AC 189 ms
81,072 KB
testcase_22 AC 187 ms
81,072 KB
testcase_23 AC 191 ms
81,072 KB
testcase_24 RE -
testcase_25 AC 169 ms
80,816 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