結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー ニックネームニックネーム
提出日時 2022-09-16 22:03:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 9,492 KB
最終ジャッジ日時 2023-08-23 15:35:57
合計ジャッジ時間 2,565 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,924 KB
testcase_01 AC 15 ms
7,896 KB
testcase_02 AC 15 ms
7,828 KB
testcase_03 AC 15 ms
7,992 KB
testcase_04 AC 15 ms
7,956 KB
testcase_05 AC 19 ms
9,464 KB
testcase_06 AC 20 ms
9,420 KB
testcase_07 AC 15 ms
7,800 KB
testcase_08 AC 18 ms
8,916 KB
testcase_09 AC 18 ms
8,776 KB
testcase_10 AC 23 ms
9,408 KB
testcase_11 AC 24 ms
9,268 KB
testcase_12 AC 15 ms
7,752 KB
testcase_13 AC 16 ms
8,204 KB
testcase_14 AC 23 ms
9,236 KB
testcase_15 AC 17 ms
8,472 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 19 ms
9,332 KB
testcase_23 AC 14 ms
7,828 KB
testcase_24 AC 16 ms
7,824 KB
testcase_25 AC 17 ms
8,920 KB
testcase_26 AC 19 ms
9,492 KB
testcase_27 AC 15 ms
7,820 KB
testcase_28 AC 18 ms
9,080 KB
testcase_29 AC 16 ms
8,392 KB
testcase_30 AC 18 ms
8,972 KB
testcase_31 AC 16 ms
8,504 KB
testcase_32 AC 16 ms
8,240 KB
testcase_33 AC 15 ms
8,316 KB
testcase_34 AC 16 ms
8,196 KB
testcase_35 AC 17 ms
8,804 KB
testcase_36 AC 15 ms
8,460 KB
testcase_37 AC 17 ms
8,900 KB
testcase_38 AC 15 ms
8,300 KB
testcase_39 AC 17 ms
8,648 KB
testcase_40 AC 17 ms
8,792 KB
testcase_41 AC 18 ms
8,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m = int(input())
s = input()
c = [s[i::3].count("c") for i in range(3)]
o = [s[i::3].count("o") for i in range(3)]
n = [s[i::3].count("n") for i in range(3)]
ans = 0
for i in range(3): ans += min(c[i], o[(i+1)%3], n[(i+2)%3])
print(min(ans, m-1))
0