#abc338a. A - Capitalized?
A - Capitalized?
Score: points
问题描述
给定一个非空字符串 ,由大小写英文字母组成。确定以下条件是否满足:
- 字符串 的首字符为大写,其余所有字符均为小写。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a non-empty string consisting of uppercase and lowercase English letters. Determine whether the following condition is satisfied:
- The first character of is uppercase, and all other characters are lowercase.
Constraints
- ( is the length of the string .)
- Each character of is an uppercase or lowercase English letter.
Input
The input is given from Standard Input in the following format:
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
update @ 2024/3/10 01:28:49