103571: [Atcoder]ABC357 B - Uppercase and Lowercase

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:8 Solved:0

Description

Score : $200$ points

Problem Statement

You are given a string $S$ consisting of lowercase and uppercase English letters. The length of $S$ is odd.
If the number of uppercase letters in $S$ is greater than the number of lowercase letters, convert all lowercase letters in $S$ to uppercase.
Otherwise, convert all uppercase letters in $S$ to lowercase.

Constraints

  • $S$ is a string consisting of lowercase and uppercase English letters.
  • The length of $S$ is an odd number between $1$ and $99$, inclusive.

Input

The input is given from Standard Input in the following format:

$S$

Output

Print the string $S$ after converting the letters according to the problem statement.


Sample Input 1

AtCoder

Sample Output 1

atcoder

The string AtCoder contains five lowercase letters and two uppercase letters. Thus, convert all uppercase letters in AtCoder to lowercase, which results in atcoder.


Sample Input 2

SunTORY

Sample Output 2

SUNTORY

The string SunTORY contains two lowercase letters and five uppercase letters. Thus, convert all lowercase letters in SunTORY to uppercase, which results in SUNTORY.


Sample Input 3

a

Sample Output 3

a

Output

得分:200分 ---

问题描述

你得到一个字符串$S$,其中包含大小写的英文字母。$S$的长度是奇数。
如果$S$中的大写字母数量多于小写字母数量,将$S$中的所有小写字母转换为大写。
否则,将$S$中的所有大写字母转换为小写。

限制条件

  • $S$是一个由大小写英文字母组成的字符串。
  • $S$的长度是介于1和99之间的奇数。

输入

输入数据通过标准输入给出以下格式:

$S$

输出

按照问题描述转换字母后,打印字符串$S$。


样例输入1

AtCoder

样例输出1

atcoder

字符串AtCoder包含五个小写字母和两个大写字母。因此,将AtCoder中的所有大写字母转换为小写,得到atcoder


样例输入2

SunTORY

样例输出2

SUNTORY

字符串SunTORY包含两个小写字母和五个大写字母。因此,将SunTORY中的所有小写字母转换为大写,得到SUNTORY


样例输入3

a

样例输出3

a

加入题单

算法标签: