-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8a312d
commit c165630
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
While checking the English papers of the board exams ,the professor often gets frustated by the writing format of words of the student in the examination paper. The words were a net mix of upper case and the lower case letters in every words. An idea struck into the mind of the professor to develop an extension that would change the letters' register in every word so that it either only consisted of lower case letters or, vice cersa, only of uppercase ones. At that as little as possible letters should be changed in the word. For example, the word HoUse must be replaced with house, and the word ViP — with VIP. | ||
|
||
If a word contains an equal number of uppercase and lowercase letters, you should replace all the letters with lowercase ones. For example, maTRIx should be replaced by matrix. Your task is to use the given method on one given word. | ||
|
||
Input Description:- | ||
- First line of input consists of t, the number of test cases | ||
- Next t lines each consists of: | ||
String: string comprising both upper and lower case letters | ||
|
||
Input variables: | ||
int t: No. of test cases | ||
String : string comprising both upper and lower case letters | ||
|
||
Output Description: | ||
Print the corrected word. If the given word has strictly more uppercase letters, make the word written in the uppercase register, otherwise - in the lowercase one. | ||
|
||
Constraints: | ||
1<=t<=4 | ||
A,a<=value of each character<=Z,z | ||
|
||
Sample Input: | ||
3 | ||
HoUse | ||
ViP | ||
maTRIx | ||
|
||
|
||
Sample Output: | ||
house | ||
VIP | ||
matrix | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
4 | ||
DBBZJCWQEVGYHEEUHJAWRHBDPsnplijbwtdibqrrheebfxqcvn | ||
KSXBXWpebh | ||
qvxpQullmcBEGSdskddortcvxyqlBVXMMKHevovn | ||
KSXBXWpebhERPZGrodyuBNHWpnpawg |