結果

問題 No.341 沈黙の期間
ユーザー bal4ubal4u
提出日時 2019-05-05 20:43:49
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 27,748 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-08 07:29:40
合計ジャッジ時間 810 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 0 ms
4,376 KB
testcase_02 WA -
testcase_03 AC 0 ms
4,384 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 0 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 WA -
testcase_13 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// yukicoder: No.341 沈黙の期間
// 2019.5.5 bal4u

#include <stdio.h>

#define gc() getchar()

void ins(unsigned char *s)  // 文字列の入力,スペース以下の文字で入力終了
{
	do *s = gc();
	while (*s++ > ' ');
	*(s-1) = 0;
}

unsigned char S[1000];

int main()
{
	int w, ans;
	unsigned char *s;
	
	ins(s = S);
	w = ans = 0; while (*s) {
		if (*s == 0xe2 && *(s+1) == 0x80 && *(s+2) == 0xa6) s += 2, w++;
		else {
			if (w > ans) ans = w;
			w = 0;
		}
		s++;
	}
	printf("%d\n", ans);
	return 0;
}
0