結果
問題 | No.558 575検出するやつ |
ユーザー | ilplrr |
提出日時 | 2017-11-07 16:00:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 560 ms |
コンパイル使用メモリ | 66,676 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 04:46:57 |
合計ジャッジ時間 | 1,068 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 15 |
ソースコード
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string s; cin >> s; if (s.length() < 3) return cout << "NO" << endl, 0; for (int i = 0; i < s.length() - 2; i++) { if (s.substr(i, 3) == "575") return cout << "YES" << endl, 0; } cout << "NO" << endl; return 0; }