結果

問題 No.2055 12x34...
ユーザー 👑 KazunKazun
提出日時 2022-08-25 19:37:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 178 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 155,612 KB
最終ジャッジ日時 2024-04-21 02:55:37
合計ジャッジ時間 6,656 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
53,248 KB
testcase_01 AC 41 ms
53,760 KB
testcase_02 AC 56 ms
70,784 KB
testcase_03 AC 70 ms
83,456 KB
testcase_04 AC 78 ms
92,928 KB
testcase_05 AC 83 ms
96,512 KB
testcase_06 AC 79 ms
92,672 KB
testcase_07 AC 70 ms
86,144 KB
testcase_08 AC 65 ms
78,464 KB
testcase_09 AC 84 ms
97,920 KB
testcase_10 AC 87 ms
101,888 KB
testcase_11 AC 63 ms
76,928 KB
testcase_12 AC 126 ms
112,000 KB
testcase_13 AC 167 ms
133,140 KB
testcase_14 AC 98 ms
102,528 KB
testcase_15 AC 96 ms
102,528 KB
testcase_16 AC 178 ms
155,612 KB
testcase_17 AC 77 ms
88,192 KB
testcase_18 AC 101 ms
100,992 KB
testcase_19 AC 60 ms
72,320 KB
testcase_20 AC 53 ms
66,560 KB
testcase_21 AC 59 ms
72,448 KB
testcase_22 AC 123 ms
109,444 KB
testcase_23 AC 121 ms
106,652 KB
testcase_24 AC 131 ms
109,892 KB
testcase_25 AC 123 ms
106,624 KB
testcase_26 AC 125 ms
106,588 KB
testcase_27 AC 131 ms
109,880 KB
testcase_28 AC 126 ms
106,856 KB
testcase_29 AC 130 ms
109,760 KB
testcase_30 AC 125 ms
106,752 KB
testcase_31 AC 123 ms
106,624 KB
testcase_32 AC 121 ms
106,624 KB
testcase_33 AC 100 ms
105,344 KB
testcase_34 AC 98 ms
105,212 KB
testcase_35 AC 100 ms
105,292 KB
testcase_36 AC 99 ms
105,216 KB
testcase_37 AC 98 ms
105,224 KB
testcase_38 AC 99 ms
105,344 KB
testcase_39 AC 100 ms
105,344 KB
testcase_40 AC 99 ms
105,344 KB
testcase_41 AC 100 ms
105,344 KB
testcase_42 AC 99 ms
105,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

N=int(input())
A=list(map(int,input().split()))

DP=defaultdict(int)
X=0; Mod=998244353
for a in A:
    X+=DP[a-1]
    DP[a]=(DP[a]+DP[a-1]+1)%Mod

print(X%Mod)
0