結果

問題 No.2600 Avator Height
ユーザー ShirotsumeShirotsume
提出日時 2024-01-12 21:36:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 542 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 80,712 KB
最終ジャッジ日時 2024-01-12 21:36:19
合計ジャッジ時間 6,640 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
65,316 KB
testcase_01 AC 145 ms
80,196 KB
testcase_02 AC 145 ms
80,196 KB
testcase_03 AC 148 ms
80,196 KB
testcase_04 AC 146 ms
80,196 KB
testcase_05 AC 149 ms
80,196 KB
testcase_06 AC 146 ms
80,196 KB
testcase_07 AC 148 ms
80,196 KB
testcase_08 AC 150 ms
80,196 KB
testcase_09 AC 148 ms
80,196 KB
testcase_10 AC 150 ms
80,196 KB
testcase_11 AC 147 ms
80,196 KB
testcase_12 AC 149 ms
80,196 KB
testcase_13 AC 147 ms
80,196 KB
testcase_14 AC 152 ms
80,196 KB
testcase_15 AC 151 ms
80,196 KB
testcase_16 AC 149 ms
80,196 KB
testcase_17 AC 148 ms
80,196 KB
testcase_18 AC 148 ms
80,196 KB
testcase_19 AC 150 ms
80,196 KB
testcase_20 AC 151 ms
80,196 KB
testcase_21 AC 152 ms
80,196 KB
testcase_22 AC 149 ms
80,196 KB
testcase_23 AC 149 ms
80,196 KB
testcase_24 AC 115 ms
80,712 KB
testcase_25 AC 126 ms
80,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

r = [0] * (2 * 10 ** 5 + 3)
e = [0] * (2 * 10 ** 5 + 3)

r[1] = 1
r[2] = 1
e[1] = 1
e[2] = 3

for i in range(3,2 * 10 ** 5 + 2):
    r[i] = (r[i - 1] + r[i - 2]) % mod
    e[i] = (e[i - 1] + e[i - 2]) % mod
q = ii()
for _ in range(q):
    n= ii()
    print((5 * r[n] * r[n] - e[n] * e[n]) % mod)
0