結果
| 問題 | No.653 E869120 and Lucky Numbers |
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-11-25 15:28:21 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 316 ms |
| コンパイル使用メモリ | 77,044 KB |
| 実行使用メモリ | 9,796 KB |
| 最終ジャッジ日時 | 2026-08-24 07:10:04 |
| 合計ジャッジ時間 | 2,187 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 6 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
string p;
cin >> p;
int N = p.size();
bool ok = true;
if (p[0] != '1'){
ok = false;
}
if (!('2' <= p[N - 1] && p[N - 1] <= '4')){
ok = false;
}
for (int i = 1; i < N - 1; i++){
if (!('3' <= p[i] && p[i] <= '5')){
ok = false;
}
}
if (ok){
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
SSRS