結果

問題 No.2055 12x34...
ユーザー roarisroaris
提出日時 2022-08-23 06:43:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 82,416 KB
実行使用メモリ 155,704 KB
最終ジャッジ日時 2024-04-18 20:05:34
合計ジャッジ時間 6,693 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,540 KB
testcase_01 AC 46 ms
53,760 KB
testcase_02 AC 52 ms
71,680 KB
testcase_03 AC 64 ms
85,248 KB
testcase_04 AC 75 ms
95,360 KB
testcase_05 AC 78 ms
100,224 KB
testcase_06 AC 74 ms
94,820 KB
testcase_07 AC 71 ms
87,680 KB
testcase_08 AC 62 ms
79,744 KB
testcase_09 AC 84 ms
100,440 KB
testcase_10 AC 87 ms
103,680 KB
testcase_11 AC 59 ms
77,952 KB
testcase_12 AC 117 ms
113,664 KB
testcase_13 AC 154 ms
133,128 KB
testcase_14 AC 89 ms
102,144 KB
testcase_15 AC 88 ms
102,656 KB
testcase_16 AC 163 ms
155,704 KB
testcase_17 AC 70 ms
89,072 KB
testcase_18 AC 97 ms
99,632 KB
testcase_19 AC 56 ms
73,728 KB
testcase_20 AC 52 ms
66,944 KB
testcase_21 AC 56 ms
73,472 KB
testcase_22 AC 117 ms
109,440 KB
testcase_23 AC 117 ms
105,812 KB
testcase_24 AC 122 ms
109,956 KB
testcase_25 AC 123 ms
105,600 KB
testcase_26 AC 134 ms
105,368 KB
testcase_27 AC 133 ms
109,836 KB
testcase_28 AC 121 ms
105,576 KB
testcase_29 AC 133 ms
110,024 KB
testcase_30 AC 123 ms
105,600 KB
testcase_31 AC 122 ms
105,356 KB
testcase_32 AC 124 ms
105,600 KB
testcase_33 AC 96 ms
104,444 KB
testcase_34 AC 94 ms
104,528 KB
testcase_35 AC 93 ms
104,704 KB
testcase_36 AC 91 ms
104,736 KB
testcase_37 AC 95 ms
104,832 KB
testcase_38 AC 93 ms
104,556 KB
testcase_39 AC 91 ms
104,564 KB
testcase_40 AC 90 ms
104,512 KB
testcase_41 AC 94 ms
104,620 KB
testcase_42 AC 94 ms
104,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

N = int(input())
A = list(map(int, input().split()))
d = defaultdict(int)
MOD = 998244353

for Ai in A:
    d[Ai] += 1+d[Ai-1]
    d[Ai] %= MOD

ans = (sum(d.values())-N)%MOD
print(ans)
0