結果
問題 | No.436 ccw |
ユーザー |
![]() |
提出日時 | 2020-01-15 01:50:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 292 bytes |
コンパイル時間 | 2,480 ms |
コンパイル使用メモリ | 191,840 KB |
最終ジャッジ日時 | 2025-01-08 18:07:15 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int c, w; c = w = 0; string s; cin >> s; for (auto t : s){ if (t == 'c') c++; else w++; } c--; cout << min(c, w) << endl; return 0; }