結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-17 13:08:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 291 bytes |
| コンパイル時間 | 349 ms |
| コンパイル使用メモリ | 27,648 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-17 13:08:17 |
| 合計ジャッジ時間 | 1,801 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%s",str);
| ~~~~~^~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
char str[7];
int ans = 0;
int count = 0;
for(int i = 0;i < 2;i ++){
scanf("%s",str);
for(int i = 0;i < 7;i ++){
if(str[i] == 'o'){
count++;
}else{
count = 0;
}
if(count > ans){
ans = count;
}
}
}
printf("%d",ans);
}
sasa