結果

問題 No.558 575検出するやつ
ユーザー Konton7
提出日時 2020-01-17 15:33:14
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 470 bytes
コンパイル時間 2,561 ms
コンパイル使用メモリ 193,372 KB
最終ジャッジ日時 2025-01-08 18:12:37
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 5
other WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

#define DEBUG

int main()
{

#ifdef DEBUG
    cout << "DEBUG MODE" << endl;
    ifstream in("input.txt"); //for debug
    cin.rdbuf(in.rdbuf());    //for debug
#endif

    string s, ans;
    ans = "NO";
    cin >> s;
    int n = s.length();
    for (int i = 0; i < n - 2; i++){
        if (s.substr(i, 3) == "575"){
            ans = "YES"; 
        }
    } 
    cout << ans << endl;
    return 0;
}
0