結果

問題 No.558 575検出するやつ
ユーザー suppy193
提出日時 2020-03-20 14:58:55
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 291 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 20,096 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-14 05:51:38
合計ジャッジ時間 825 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 2
other AC * 7 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:13: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
   11 |             exit(0);
      |             ^~~~
main.c:2:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:11:13: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
   11 |             exit(0);
      |             ^~~~
main.c:11:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%s", s);
      |     ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void)
{
    int i;
    char s[101];
    scanf("%s", s);
    for(i = 0; s[i + 2] =='\0';i++){
        if(s[i] == '5' && s[i + 1] == '7' && s[i + 2] == '5'){
            printf("YeS\n");
            exit(0);
        }
    }
    printf("NO\n");
    
    return 0;
}
0