103380: [Atcoder]ABC338 A - Capitalized?
Description
Score: $100$ points
Problem Statement
You are given a non-empty string $S$ consisting of uppercase and lowercase English letters. Determine whether the following condition is satisfied:
- The first character of $S$ is uppercase, and all other characters are lowercase.
Constraints
- $1 \leq |S| \leq 100$ ($|S|$ is the length of the string $S$.)
- Each character of $S$ is an uppercase or lowercase English letter.
Input
The input is given from Standard Input in the following format:
$S$
Output
If the condition is satisfied, print Yes
; otherwise, print No
.
Sample Input 1
Capitalized
Sample Output 1
Yes
The first character C
of Capitalized
is uppercase, and all other characters apitalized
are lowercase, so you should print Yes
.
Sample Input 2
AtCoder
Sample Output 2
No
AtCoder
contains an uppercase letter C
that is not at the beginning, so you should print No
.
Sample Input 3
yes
Sample Output 3
No
The first character y
of yes
is not uppercase, so you should print No
.
Sample Input 4
A
Sample Output 4
Yes
Output
问题描述
给你一个非空字符串 $S$,由大写和小写英文字母组成。确定以下条件是否满足:
- $S$ 的第一个字符是大写,所有其他字符都是小写。
约束
- $1 \leq |S| \leq 100$ ($|S|$ 是字符串 $S$ 的长度。)
- $S$ 的每个字符都是大写或小写英文字母。
输入
输入从标准输入按以下格式给出:
$S$
输出
如果条件满足,打印 Yes
;否则,打印 No
。
样例输入 1
Capitalized
样例输出 1
Yes
Capitalized
的第一个字符 C
是大写,所有其他字符 apitalized
都是小写,所以你应该打印 Yes
。
样例输入 2
AtCoder
样例输出 2
No
AtCoder
包含一个不在开头的大写字母 C
,所以你应该打印 No
。
样例输入 3
yes
样例输出 3
No
yes
的第一个字符 y
不是大写,所以你应该打印 No
。
样例输入 4
A
样例输出 4
Yes