結果

問題 No.1643 Not Substring
ユーザー bal4u
提出日時 2021-08-13 21:31:58
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-03 21:37:24
合計ジャッジ時間 1,192 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

// yuki 1643 Not Substring
// 2021.8.13

#include <stdio.h>

char S[105];
int main()
{
	char *s;
	scanf("%s", s = S);
	int w = 0;
	while (*s) {
		if (*s == 'a') {
			char *p = s++; while (*s == 'a') s++;
			if (s-p > w) w = s-p;
		} else s++;
	}
	while (w--) putchar('a');
	puts("a");
	return 0;
}
0