結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー butsurizuki
提出日時 2016-11-14 14:30:19
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 302 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 20,736 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-18 09:55:11
合計ジャッジ時間 1,031 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%s",s);
      |         ^~~~~~~~~~~~~
main.c:12:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |         scanf("%s",s);
      |         ^~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {
	int a = 0,m = 0,i;
	char s[8];
	scanf("%s",s);
	for(i = 0;i < 7;i++){
		if(s[i] == 'o'){a++;}
		else{a = 0;}
		if(a > m){m = a;}
	}
	scanf("%s",s);
	for(i = 0;i < 7;i++){
		if(s[i] == 'o'){a++;}
		else{a = 0;}
		if(a > m){m = a;}
	}
	printf("%d\n",m);
	return 0;
}
0