結果

問題 No.203 ゴールデン・ウィーク(1)
コンテスト
ユーザー でばら焼肉のたれ
提出日時 2026-09-23 15:24:28
言語 C
(gcc 15.3.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 0 ms / 1,000 ms
+ 764µs
コード長 366 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 756 ms
コンパイル使用メモリ 38,080 KB
実行使用メモリ 9,872 KB
最終ジャッジ日時 2026-09-23 15:24:32
合計ジャッジ時間 2,343 ms
ジャッジサーバーID
(参考情報)
judge4_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <string.h>


int main(void)
{
	char c1[15], c2[15];
	int total = 0;
	int max = 0;
	int i;

	scanf("%s", c1);
	scanf("%s", c2);

	strcat(c1, c2);

	for (i = 0; i < strlen(c1) + 1; i++) {
		if (c1[i] == 'o') {
			total++;
			} else {
				if (max < total) {
					max = total;
				}
				total = 0;
			}
	}
	printf("%d\n", max);

	return 0;
}
0