結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2022-09-16 21:37:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 105,580 KB
最終ジャッジ日時 2023-08-23 14:36:14
合計ジャッジ時間 7,927 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,372 KB
testcase_01 AC 70 ms
71,548 KB
testcase_02 AC 72 ms
71,576 KB
testcase_03 AC 71 ms
71,108 KB
testcase_04 AC 71 ms
71,240 KB
testcase_05 AC 210 ms
105,560 KB
testcase_06 AC 211 ms
105,560 KB
testcase_07 AC 70 ms
71,376 KB
testcase_08 AC 165 ms
94,680 KB
testcase_09 AC 183 ms
98,828 KB
testcase_10 AC 210 ms
105,308 KB
testcase_11 AC 209 ms
105,360 KB
testcase_12 AC 71 ms
71,240 KB
testcase_13 AC 88 ms
77,044 KB
testcase_14 AC 194 ms
101,252 KB
testcase_15 AC 119 ms
84,932 KB
testcase_16 AC 206 ms
105,488 KB
testcase_17 AC 71 ms
71,240 KB
testcase_18 AC 87 ms
77,112 KB
testcase_19 AC 212 ms
104,368 KB
testcase_20 AC 168 ms
94,688 KB
testcase_21 AC 154 ms
94,016 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=list(input())
from _collections import defaultdict
cnt=defaultdict(int)
for i in range(3*n):
    cnt[i%3,s[i]]+=1
ans=0
for j in range(3):
    res=min(cnt[j,"c"],cnt[(j+1)%3,"o"],cnt[(j+2)%3,"n"])
    ans+=res
print(ans)

0