結果

問題 No.2600 Avator Height
ユーザー 👑 tipstar0125tipstar0125
提出日時 2024-01-12 21:33:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 563 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 79,052 KB
最終ジャッジ日時 2024-01-12 21:33:59
合計ジャッジ時間 16,192 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
62,640 KB
testcase_01 AC 507 ms
79,044 KB
testcase_02 AC 539 ms
79,044 KB
testcase_03 AC 563 ms
79,044 KB
testcase_04 AC 507 ms
79,044 KB
testcase_05 AC 512 ms
79,044 KB
testcase_06 AC 507 ms
79,044 KB
testcase_07 AC 513 ms
79,044 KB
testcase_08 AC 537 ms
79,044 KB
testcase_09 AC 510 ms
79,044 KB
testcase_10 AC 536 ms
79,044 KB
testcase_11 AC 501 ms
79,044 KB
testcase_12 AC 541 ms
79,044 KB
testcase_13 AC 507 ms
79,044 KB
testcase_14 AC 534 ms
79,044 KB
testcase_15 AC 506 ms
79,044 KB
testcase_16 AC 532 ms
79,044 KB
testcase_17 AC 507 ms
79,044 KB
testcase_18 AC 510 ms
79,044 KB
testcase_19 AC 533 ms
79,044 KB
testcase_20 AC 522 ms
79,044 KB
testcase_21 AC 536 ms
79,044 KB
testcase_22 AC 511 ms
79,044 KB
testcase_23 AC 533 ms
79,044 KB
testcase_24 AC 450 ms
79,052 KB
testcase_25 AC 506 ms
79,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())

mod=998244353
R=[1 for _ in range(int(2e5)+1)]
E=[1 for _ in range(int(2e5)+1)]
E[2]=3

for i in range(3,int(2e5)+1):
    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())
    ans=5*R[N]**2-E[N]**2
    ans+=mod
    ans%=mod
    print(ans)
0