結果

問題 No.2600 Avator Height
ユーザー rlangevinrlangevin
提出日時 2024-02-19 19:57:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 190 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 79,624 KB
最終ジャッジ日時 2024-02-19 19:57:25
合計ジャッジ時間 8,777 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
62,628 KB
testcase_01 AC 148 ms
78,984 KB
testcase_02 AC 154 ms
78,984 KB
testcase_03 AC 159 ms
78,984 KB
testcase_04 AC 156 ms
78,984 KB
testcase_05 AC 159 ms
78,984 KB
testcase_06 AC 160 ms
78,984 KB
testcase_07 AC 154 ms
78,984 KB
testcase_08 AC 155 ms
78,984 KB
testcase_09 AC 154 ms
78,984 KB
testcase_10 AC 155 ms
78,984 KB
testcase_11 AC 159 ms
78,984 KB
testcase_12 AC 156 ms
78,984 KB
testcase_13 AC 158 ms
78,856 KB
testcase_14 AC 155 ms
78,984 KB
testcase_15 AC 151 ms
78,984 KB
testcase_16 AC 159 ms
78,984 KB
testcase_17 AC 154 ms
78,984 KB
testcase_18 AC 157 ms
78,984 KB
testcase_19 AC 190 ms
78,984 KB
testcase_20 AC 153 ms
78,984 KB
testcase_21 AC 158 ms
78,984 KB
testcase_22 AC 154 ms
78,984 KB
testcase_23 AC 159 ms
78,984 KB
testcase_24 AC 111 ms
79,624 KB
testcase_25 AC 130 ms
78,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

Q = int(input())
M = 2 * 10 ** 5 + 5
R, E = [1] * M, [1] * M
E[1] = 3
mod = 998244353
for i in range(2, M):
    R[i] = (R[i - 1] + R[i - 2]) % mod
    E[i] = (E[i - 1] + E[i - 2]) % mod
    
for _ in range(Q):
    N = int(input())
    print( (5 * R[N - 1] ** 2 - E[N - 1] ** 2) % mod )
0