#abc350a. A - Past ABCs
A - Past ABCs
Score: points
问题陈述
给定一个长度为6的字符串 。保证 的前三个字符是 ABC
,后三个字符是数字。
确定 是否是在这个比赛开始之前在AtCoder上举行并结束的比赛的缩写。
这里,如果一个字符串 是“在这个比赛开始之前在AtCoder上举行并结束的比赛的缩写”,当且仅当它等于以下 个字符串中的一个:
ABC001
, ABC002
, , ABC314
, ABC315
, ABC317
, ABC318
, , ABC348
, ABC349
。
注意,ABC316
不包括在内。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
You are given a string of length . It is guaranteed that the first three characters of are ABC
and the last three characters are digits.
Determine if is the abbreviation of a contest held and concluded on AtCoder before the start of this contest.
Here, a string is "the abbreviation of a contest held and concluded on AtCoder before the start of this contest" if and only if it equals one of the following strings:
ABC001
, ABC002
, , ABC314
, ABC315
, ABC317
, ABC318
, , ABC348
, ABC349
.
Note that ABC316
is not included.
Constraints
- is a string of length where the first three characters are
ABC
and the last three characters are digits.
Input
The input is given from Standard Input in the following format:
Output
If is the abbreviation of a contest held and concluded on AtCoder before the start of this contest, print Yes
; otherwise, print No
.
Sample Input 1
ABC349
Sample Output 1
Yes
ABC349
is the abbreviation of a contest held and concluded on AtCoder last week.
Sample Input 2
ABC350
Sample Output 2
No
ABC350
is this contest, which has not concluded yet.
Sample Input 3
ABC316
Sample Output 3
No
ABC316
was not held on AtCoder.