結果

問題 No.558 575検出するやつ
ユーザー aitdccd
提出日時 2017-09-15 04:19:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 1,239 ms
コンパイル使用メモリ 159,508 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 21:40:38
合計ジャッジ時間 2,103 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)

int main() {
    string s;
    cin >> s;

    int len = s.length();
    if (len < 3) {
        cout << "NO";
        return 0;
    }

    REP(i, len - 2) {
        if (s.substr(i, 3) == "575") {
            cout << "YES";
            return 0;
        }
    }
    cout << "NO";
}
0