#abc291a. A - camel Case
A - camel Case
Score : points
## 问题描述
给定一个由大写和小写英文字母组成的字符串 $S$。
其中,$S$ 中恰好有一个字符是大写的,其余均为小写。
找出整数 $x$,使得 $S$ 的第 $x$ 个字符是大写的。
这里,$S$ 的首字符被视为第 $1$ 个字符。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a string consisting of uppercase and lowercase English letters.
Here, exactly one character of is uppercase, and the others are all lowercase.
Find the integer such that the -th character of is uppercase.
Here, the initial character of is considered the -st one.
Constraints
- is a string of length between and , inclusive, consisting of uppercase and lowercase English letters.
- has exactly one uppercase letter.
Input
The input is given from Standard Input in the following format:
Output
Print the integer such that the -th character of is uppercase.
Sample Input 1
aBc
Sample Output 1
2
The -st character of aBc
is a
, the -nd is B
, and the -rd is c
; the -nd character is uppercase.
Thus, should be printed.
Sample Input 2
xxxxxxXxxx
Sample Output 2
7
An uppercase letter X
occurs as the -th character of xxxxxxXxxx
, so should be printed.
Sample Input 3
Zz
Sample Output 3
1
update @ 2024/3/10 12:08:04