結果

問題 No.2600 Avator Height
ユーザー miya145592miya145592
提出日時 2024-01-12 23:09:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 105,100 KB
最終ジャッジ日時 2024-01-12 23:09:12
合計ジャッジ時間 7,549 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
89,348 KB
testcase_01 AC 154 ms
105,100 KB
testcase_02 AC 158 ms
104,972 KB
testcase_03 AC 159 ms
104,972 KB
testcase_04 AC 160 ms
104,972 KB
testcase_05 AC 160 ms
104,972 KB
testcase_06 AC 160 ms
105,100 KB
testcase_07 AC 158 ms
105,100 KB
testcase_08 AC 155 ms
104,972 KB
testcase_09 AC 156 ms
105,100 KB
testcase_10 AC 162 ms
104,972 KB
testcase_11 AC 156 ms
105,100 KB
testcase_12 AC 155 ms
104,972 KB
testcase_13 AC 154 ms
105,100 KB
testcase_14 AC 155 ms
104,972 KB
testcase_15 AC 152 ms
104,972 KB
testcase_16 AC 158 ms
105,100 KB
testcase_17 AC 153 ms
104,972 KB
testcase_18 AC 153 ms
104,972 KB
testcase_19 AC 152 ms
105,100 KB
testcase_20 AC 156 ms
105,100 KB
testcase_21 AC 155 ms
104,972 KB
testcase_22 AC 160 ms
104,972 KB
testcase_23 AC 154 ms
104,972 KB
testcase_24 AC 123 ms
104,980 KB
testcase_25 AC 131 ms
104,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
MOD = 998244353
Q = int(input())
N = [int(input()) for _ in range(Q)]
R = [1, 1]
E = [1, 3]
for i in range(2, 2*10**5):
    R.append((R[-2]+R[-1])%MOD)
    E.append((E[-2]+E[-1])%MOD)
for n in N:
    n-=1
    ans = 5*R[n]**2%MOD-E[n]**2%MOD
    print(ans%MOD)
0