結果

問題 No.2600 Avator Height
ユーザー tkykwtnbtkykwtnb
提出日時 2024-03-24 14:53:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 840 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 33,664 KB
最終ジャッジ日時 2024-03-24 14:53:48
合計ジャッジ時間 24,232 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 182 ms
25,728 KB
testcase_01 AC 807 ms
33,664 KB
testcase_02 AC 818 ms
33,664 KB
testcase_03 AC 820 ms
33,664 KB
testcase_04 AC 789 ms
33,664 KB
testcase_05 AC 815 ms
33,664 KB
testcase_06 AC 827 ms
33,664 KB
testcase_07 AC 802 ms
33,664 KB
testcase_08 AC 829 ms
33,664 KB
testcase_09 AC 816 ms
33,664 KB
testcase_10 AC 815 ms
33,664 KB
testcase_11 AC 806 ms
33,664 KB
testcase_12 AC 827 ms
33,664 KB
testcase_13 AC 820 ms
33,664 KB
testcase_14 AC 799 ms
33,664 KB
testcase_15 AC 840 ms
33,664 KB
testcase_16 AC 828 ms
33,664 KB
testcase_17 AC 805 ms
33,664 KB
testcase_18 AC 832 ms
33,664 KB
testcase_19 AC 840 ms
33,664 KB
testcase_20 AC 799 ms
33,664 KB
testcase_21 AC 808 ms
33,664 KB
testcase_22 AC 828 ms
33,664 KB
testcase_23 AC 831 ms
33,664 KB
testcase_24 AC 710 ms
27,520 KB
testcase_25 AC 768 ms
33,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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