結果
| 問題 |
No.2073 Concon Substrings (Swap Version)
|
| コンテスト | |
| ユーザー |
taiga0629kyopro
|
| 提出日時 | 2022-09-16 21:37:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 240 bytes |
| コンパイル時間 | 349 ms |
| コンパイル使用メモリ | 81,984 KB |
| 実行使用メモリ | 104,584 KB |
| 最終ジャッジ日時 | 2024-12-21 18:39:09 |
| 合計ジャッジ時間 | 6,141 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 17 WA * 20 |
ソースコード
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)
taiga0629kyopro