結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー titiatitia
提出日時 2022-09-19 05:57:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 9,548 KB
最終ジャッジ日時 2023-08-23 18:47:20
合計ジャッジ時間 6,725 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,824 KB
testcase_01 AC 15 ms
7,828 KB
testcase_02 AC 15 ms
7,764 KB
testcase_03 AC 15 ms
7,884 KB
testcase_04 AC 15 ms
7,816 KB
testcase_05 AC 189 ms
9,488 KB
testcase_06 AC 193 ms
9,312 KB
testcase_07 AC 15 ms
7,828 KB
testcase_08 AC 122 ms
8,972 KB
testcase_09 AC 154 ms
9,052 KB
testcase_10 AC 236 ms
9,368 KB
testcase_11 AC 233 ms
9,296 KB
testcase_12 AC 15 ms
7,892 KB
testcase_13 AC 36 ms
8,312 KB
testcase_14 AC 207 ms
9,108 KB
testcase_15 AC 82 ms
8,432 KB
testcase_16 AC 257 ms
9,496 KB
testcase_17 AC 15 ms
7,760 KB
testcase_18 AC 38 ms
7,764 KB
testcase_19 AC 243 ms
9,304 KB
testcase_20 AC 183 ms
8,896 KB
testcase_21 AC 156 ms
9,040 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 #

LEN=int(input())
S=input()

C=[0]*3
O=[0]*3
N=[0]*3

for i in range(LEN*3):
    if S[i]=="c":
        C[i%3]+=1
    if S[i]=="o":
        O[i%3]+=1
    if S[i]=="n":
        N[i%3]+=1

ANS=0

ANS+=min(C[0],O[1],N[2])
ANS+=min(C[1],O[2],N[0])
ANS+=min(C[2],O[0],N[1])

print(ANS)
0