結果
問題 | No.436 ccw |
ユーザー |
![]() |
提出日時 | 2016-10-28 22:25:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 306 bytes |
コンパイル時間 | 1,247 ms |
コンパイル使用メモリ | 157,560 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 05:41:47 |
合計ジャッジ時間 | 2,063 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ string str; int cntC=0; int cntW=0; cin>>str; for(int i=0; i<str.length(); i++){ if(str[i]=='c'){ cntC++; }else{ cntW++; } } cout<<(min(cntC-1,cntW)); return 0; }