One bright morning,
's English teacher needed help marking some essays. Naturally, went out of his way to help him. When gets the papers, he notices that the essays are riddled with improper capitalization everywhere.Wanting to help his classmates (but not having enough time to properly fix their errors),
decides to convert the entire essay into either lowercase or uppercase text. He wants to do the least work possible, so he will convert an essay to lowercase if it already has more lowercase characters than uppercase, and vice-versa. If a tie occurs, he will leave the essay as it is.Having a lot of essays to fix,
asks you to write a program to help him!Input Specification
The input will consist of one line, containing one essay. The essay will have spaces and alphanumeric characters only. It is guaranteed that there are no more than characters in the essay. The essay may contain leading whitespace.
Output Specification
Output the modified essay, according to the rules above.
Sample Input
mITOCHONDRIA iS tHE pOWERHOUSE oF tHE cELL
Sample Output
MITOCHONDRIA IS THE POWERHOUSE OF THE CELL
Comments
I'm pretty sure I solved this problem, however it keeps saying WA. Does anyone mind checking my code and seeing if I missed something really small, because I've spent 2 hours and I have no clue what's wrong. My code is in C++14. Thanks.
Edit: nevermind, looks like I was printing a null character at the end of my output.
What if the number of maj = number of min ? please Help!
If a tie occurs, he will leave the essay as it is.
Harambe RIP :(
could the essay contain numbers? like: u wot m8
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.