結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
|
提出日時 | 2017-03-03 13:23:27 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 349 bytes |
コンパイル時間 | 318 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 04:46:18 |
合計ジャッジ時間 | 1,181 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 WA * 10 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%s",&C[i]); | ^~~~~~~~~~~~~~~~~ main.c:12:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%s",&C[i]); | ^~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ int i,total=0,count=0; char C[14]; for(i=0;i<7;i++){ scanf("%s",&C[i]); } for(i=7;i<14;i++){ scanf("%s",&C[i]); } //for(i=0;i<14;i++) //printf("C[%d]=%c\n",i,C[i]); for(i=0;i<14;i++){ if(C[i]=='o') count++; else count=0; if(total < count) total=count; continue; } printf("%d\n",total); return 0; }