結果

問題 No.436 ccw
ユーザー くれちー
提出日時 2016-10-28 22:28:23
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 244 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 19,840 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-24 05:45:07
合計ジャッジ時間 988 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0