結果

問題 No.2600 Avator Height
ユーザー lloyzlloyz
提出日時 2024-01-14 18:51:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 606 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 104,544 KB
最終ジャッジ日時 2024-01-14 18:51:35
合計ジャッジ時間 18,047 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
90,364 KB
testcase_01 AC 561 ms
104,540 KB
testcase_02 AC 582 ms
104,540 KB
testcase_03 AC 555 ms
104,540 KB
testcase_04 AC 603 ms
104,540 KB
testcase_05 AC 556 ms
104,540 KB
testcase_06 AC 606 ms
104,540 KB
testcase_07 AC 552 ms
104,540 KB
testcase_08 AC 584 ms
104,540 KB
testcase_09 AC 560 ms
104,540 KB
testcase_10 AC 582 ms
104,540 KB
testcase_11 AC 553 ms
104,540 KB
testcase_12 AC 581 ms
104,540 KB
testcase_13 AC 556 ms
104,540 KB
testcase_14 AC 586 ms
104,540 KB
testcase_15 AC 556 ms
104,540 KB
testcase_16 AC 583 ms
104,540 KB
testcase_17 AC 559 ms
104,540 KB
testcase_18 AC 577 ms
104,540 KB
testcase_19 AC 570 ms
104,540 KB
testcase_20 AC 585 ms
104,540 KB
testcase_21 AC 554 ms
104,540 KB
testcase_22 AC 578 ms
104,540 KB
testcase_23 AC 555 ms
104,540 KB
testcase_24 AC 488 ms
104,544 KB
testcase_25 AC 502 ms
104,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R = [0, 1, 1]
E = [0, 1, 3]
mod = 998244353
for i in range(2, 2 * 10**5 + 1):
    R.append((R[-1] + R[-2]) % mod)
    E.append((E[-1] + E[-2]) % mod)
for _ in range(int(input())):
    n = int(input())
    res = 5 * pow(R[n], 2, mod) % mod
    res -= pow(E[n], 2, mod)
    res %= mod
    print(res)
0