結果
| 問題 | No.203 ゴールデン・ウィーク(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-14 14:30:19 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 302 bytes |
| 記録 | |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 29,608 KB |
| 最終ジャッジ日時 | 2026-02-23 22:52:09 |
|
ジャッジサーバーID (参考情報) |
judge4 / 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);
| ^~~~~~~~~~~~~
ソースコード
#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;
}