結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー ntuda
提出日時 2022-09-18 19:10:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 290 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 16,264 KB
最終ジャッジ日時 2024-12-22 01:36:31
合計ジャッジ時間 6,910 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 17 WA * 20
権限があれば一括ダウンロードができます

ソースコード

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