結果

問題 No.341 沈黙の期間
ユーザー くれちー
提出日時 2016-10-02 11:38:30
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 470 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-21 13:00:41
合計ジャッジ時間 1,079 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 2 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main() {
	char b = 0, a;
	int f = 0, cnt = 0, max = 0;

	while ((a = getchar()) != '\n') {
		if (b == -127 && a == 99) {
			cnt++;
			f = 1;
		}
		else if (a != -127) {
			f = 0;
		}
		if (cnt > max) max = cnt;
		if (f == 0) cnt = 0;
		b = a;
	}

	printf("%d\n", max);
	return 0;
}
0