結果

問題 No.2055 12x34...
ユーザー dangodango
提出日時 2023-06-14 19:33:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 182 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 572 ms
コンパイル使用メモリ 86,484 KB
実行使用メモリ 125,680 KB
最終ジャッジ日時 2023-09-05 06:12:46
合計ジャッジ時間 10,495 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,264 KB
testcase_01 AC 73 ms
71,444 KB
testcase_02 AC 94 ms
81,612 KB
testcase_03 AC 107 ms
91,088 KB
testcase_04 AC 116 ms
98,352 KB
testcase_05 AC 113 ms
101,156 KB
testcase_06 AC 116 ms
98,528 KB
testcase_07 AC 105 ms
93,224 KB
testcase_08 AC 97 ms
87,640 KB
testcase_09 AC 115 ms
101,644 KB
testcase_10 AC 128 ms
104,864 KB
testcase_11 AC 101 ms
86,184 KB
testcase_12 AC 136 ms
111,724 KB
testcase_13 AC 164 ms
105,288 KB
testcase_14 AC 116 ms
96,532 KB
testcase_15 AC 112 ms
96,660 KB
testcase_16 AC 182 ms
125,680 KB
testcase_17 AC 106 ms
92,248 KB
testcase_18 AC 125 ms
101,964 KB
testcase_19 AC 88 ms
80,920 KB
testcase_20 AC 82 ms
76,824 KB
testcase_21 AC 88 ms
81,044 KB
testcase_22 AC 145 ms
110,380 KB
testcase_23 AC 144 ms
107,420 KB
testcase_24 AC 152 ms
110,808 KB
testcase_25 AC 147 ms
107,672 KB
testcase_26 AC 161 ms
107,524 KB
testcase_27 AC 153 ms
110,952 KB
testcase_28 AC 149 ms
107,464 KB
testcase_29 AC 153 ms
110,788 KB
testcase_30 AC 148 ms
107,464 KB
testcase_31 AC 148 ms
107,616 KB
testcase_32 AC 151 ms
107,740 KB
testcase_33 AC 129 ms
106,308 KB
testcase_34 AC 124 ms
106,096 KB
testcase_35 AC 126 ms
106,248 KB
testcase_36 AC 122 ms
106,068 KB
testcase_37 AC 125 ms
106,236 KB
testcase_38 AC 127 ms
106,228 KB
testcase_39 AC 122 ms
106,068 KB
testcase_40 AC 123 ms
106,096 KB
testcase_41 AC 124 ms
106,064 KB
testcase_42 AC 122 ms
106,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

input()
A = list(map(int,input().split()))
ans = 0
dic = {}
for a in A:
    ans += dic.get(a - 1, 0)
    ans %= 998244353
    dic[a] = (dic.get(a, 0) + dic.get(a - 1, 0) + 1) % 998244353
print(ans)
0