Incorrect case handling


#1

I wrote a the code and also tested it on various problem. In Run As Custom Input, it gives correct answer but whenever I submit, It return wrong answer for same input.
What is this.

solution to problem : http://cpp.sh/9ubv