← 返回 meta 的题目列表Count Upper and Lower Case Difference
类型:online_judge
Given a string, count the difference in the number of uppercase and lowercase letters.
Input:
A string s containing only English letters.
Output:
An integer representing the difference between the number of uppercase and lowercase letters.
Example:
Input: 'aAb'
Output: 0
Explanation: 'A' is uppercase, 'a' and 'b' are lowercase, the count difference is 0.
Data Scale:
The length of string s is at most 1000.
Example
Input
aAb