結果

問題 No.436 ccw
ユーザー xuelei
提出日時 2018-07-29 09:49:24
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 1,357 ms
コンパイル使用メモリ 158,552 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 09:19:38
合計ジャッジ時間 1,796 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
    string s;
    cin >> s;
    int c,w;
    c=count(s.begin(),s.end(),'c');
    w=count(s.begin(),s.end(),'w');
    cout << min(c-1,w) <<endl;
    return 0;
}
0