結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー 👑 H20H20
提出日時 2022-09-16 22:52:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 1,267 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 107,012 KB
最終ジャッジ日時 2023-08-23 16:23:22
合計ジャッジ時間 8,575 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
71,684 KB
testcase_01 AC 95 ms
71,608 KB
testcase_02 AC 96 ms
71,616 KB
testcase_03 AC 94 ms
71,672 KB
testcase_04 AC 96 ms
71,580 KB
testcase_05 AC 176 ms
106,596 KB
testcase_06 AC 168 ms
107,012 KB
testcase_07 AC 97 ms
71,480 KB
testcase_08 AC 145 ms
95,648 KB
testcase_09 AC 155 ms
100,200 KB
testcase_10 AC 171 ms
106,848 KB
testcase_11 AC 170 ms
106,980 KB
testcase_12 AC 98 ms
71,688 KB
testcase_13 AC 109 ms
78,836 KB
testcase_14 AC 163 ms
102,560 KB
testcase_15 AC 119 ms
80,240 KB
testcase_16 AC 168 ms
106,796 KB
testcase_17 AC 98 ms
71,784 KB
testcase_18 AC 110 ms
78,700 KB
testcase_19 AC 163 ms
105,740 KB
testcase_20 AC 148 ms
97,772 KB
testcase_21 AC 142 ms
94,632 KB
testcase_22 AC 169 ms
106,880 KB
testcase_23 AC 98 ms
71,780 KB
testcase_24 AC 104 ms
77,708 KB
testcase_25 AC 146 ms
96,228 KB
testcase_26 AC 166 ms
106,824 KB
testcase_27 AC 96 ms
71,584 KB
testcase_28 AC 155 ms
101,340 KB
testcase_29 AC 116 ms
79,964 KB
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 #

import collections
N = int(input())
S = list(input())
C = [collections.Counter() for _ in range(3)]
for i,c in enumerate(S):
    C[i%3][c]+=1
print(min(C[0]['c'],C[1]['o'],C[2]['n'])+min(N-1,min(C[0]['o'],C[1]['n'],C[2]['c']))+min(N-1,min(C[0]['n'],C[1]['c'],C[2]['o'])))
0