結果
| 問題 |
No.558 575検出するやつ
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2019-03-22 11:09:44 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 473 bytes |
| コンパイル時間 | 585 ms |
| コンパイル使用メモリ | 60,144 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-19 02:18:02 |
| 合計ジャッジ時間 | 1,627 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 15 |
ソースコード
#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
int main()
{
std::string s;
std::cin >> s;
size_t sz = s.size();
if(sz <= 2){
std::cout << "NO" << std::endl;
return 0;
}
for(size_t i = 0; i < sz - 2; i++){
if(s[i] == '5' && s[i + 1] == '7' && s[i + 2] == '5'){
std::cout << "YES" << std::endl;
return 0;
}
}
std::cout << "NO" << std::endl;
return 0;
}