#AT2406. B - Sandwich Number
B - Sandwich Number
当前没有测试数据。
B - Sandwich Number
Score : $200$ points
Problem Statement
You are given a string $S$ consisting of uppercase English letters and digits. Determine whether $S$ satisfies the following condition.
- $S$ is a concatenation of the following characters and string in the order listed.
- An uppercase English letter
- A string of length $6$ that is a decimal representation of an integer between $100000$ and $999999$, inclusive
- An uppercase English letter
Constraints
- $S$ consists of uppercase English letters and digits.
- The length of $S$ is between $1$ and $10$, inclusive.
Input
The input is given from Standard Input in the following format:
Output
If $S$ satisfies the condition in the problem statement, print Yes
; otherwise, print No
.
Q142857Z
Yes
$S$ is a concatenation of Q
, 142857
, and Z
in this order.
Q
and Z
are uppercase English letters, and 142857
is a string of length $6$ that is a decimal representation of an integer between $100000$ and $999999$, so $S$ satisfies the condition.
AB912278C
No
AB
is not an uppercase English letter, so $S$ does not satisfy the condition.
X900000
No
The last character of $S$ is not an uppercase English letter, so $S$ does not satisfy the condition.
K012345K
No
012345
is not a string of length $6$ that is a decimal representation of an integer between $100000$ and $999999$, so $S$ does not satisfy the condition.