結果

問題 No.436 ccw
ユーザー a2011404
提出日時 2017-03-21 16:05:27
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 726 ms
コンパイル使用メモリ 19,328 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 06:03:30
合計ジャッジ時間 945 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>


int main(void) {


	char s;

	int c = 0,w = 0;


	while ((s = getchar()) != '\n') {

		if (s == 'c') c++;

		else if (s == 'w') w++;

	}


	if (c <= w) printf("%d\n", c - 1);

	else printf("%d\n", w);


	return 0;

}
0