結果
| 問題 | No.436 ccw |
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2016-10-28 22:30:23 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 245 bytes |
| 記録 | |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 28,744 KB |
| 最終ジャッジ日時 | 2026-02-23 22:44:21 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
#include <stdio.h>
int main() {
char s;
int cntc = 0, cntw = 0;
while ((s = getchar()) != '\n') {
if (s == 'c') cntc++;
else if (s == 'w') cntw++;
}
if (cntc <= cntw) printf("%d\n", cntc - 1);
else printf("%d\n", cntw);
return 0;
}
くれちー