結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー ntudantuda
提出日時 2022-09-18 19:10:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 290 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 13,588 KB
最終ジャッジ日時 2023-08-23 18:17:27
合計ジャッジ時間 6,462 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,760 KB
testcase_01 AC 15 ms
7,856 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 15 ms
7,964 KB
testcase_04 AC 15 ms
7,916 KB
testcase_05 AC 150 ms
13,512 KB
testcase_06 AC 149 ms
13,504 KB
testcase_07 AC 15 ms
7,784 KB
testcase_08 AC 100 ms
11,440 KB
testcase_09 AC 118 ms
12,204 KB
testcase_10 AC 203 ms
13,436 KB
testcase_11 AC 205 ms
13,508 KB
testcase_12 AC 14 ms
7,816 KB
testcase_13 AC 34 ms
8,608 KB
testcase_14 AC 177 ms
12,544 KB
testcase_15 AC 72 ms
9,708 KB
testcase_16 AC 219 ms
13,456 KB
testcase_17 AC 15 ms
7,816 KB
testcase_18 AC 36 ms
8,456 KB
testcase_19 AC 210 ms
13,232 KB
testcase_20 AC 166 ms
11,828 KB
testcase_21 AC 137 ms
11,384 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()
X = [[0] * 3 for _ in range(3)]
for i, c in enumerate(list(S)):
    if c == "c":
        X[i % 3][0] += 1
    if c == "o":
        X[(i - 1) % 3][1] += 1
    if c == "n":
        X[(i - 2) % 3][2] += 1
ans = 0
for i in range(3):
    ans += min(X[i])
print(ans)
0