Bluebook

Lower Case

Given an input string, whose length is less than 256, output the string with all of the upper case letters ('A'..'Z') converted to the corresponding lower case letter ('a'..'z').

Input

Line 1: one integer T (1 ≤ T ≤ 100) denoting the number of test cases.
Lines 2..T+1: one string of length < 256 composed of lower case letters ('a'..'z'), upper case letters ('A'..'Z'), and random characters ('*', ';', etc).

Sample Input

2
abCDefg
WEEEIPWNNOOBS~~?~?~??@#!#$%?$^?$%*

Sample Output

abcdefg
weeeipwnnoobs~~?~?~??@#~#$%?$^?$%*

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 27, 2008

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

There is a typo in the sample output. The "!" in the input disappears in the output

i dont know whats wrong with my code, it uses the lower statement in python but it still doesnt work. Can someone pls help?

this is what it says
Traceback (most recent call last):
File "./prog.py", line 4, in <module>
TypeError: lower() takes no arguments (1 given)

You haven't defined n yet. It's still an input.

ive defined it as a string but it still say the same thing

Exactly what it says. The lower() function takes no parameters but you gave it one. It's just called on a string, i.e. str.lower().

Input
Line 1: one integer T (1 ≤ T ≤ 100) denoting the number of test cases.
Lines 2..T+1: one string of length < 256 composed of lower case letters ('a'..'z'), upper case letters ('A'..'Z'), and random characters ('*', ';', etc).


What would T+1 mean? Because it says Lines 2, is the input one string or multiple strings?

If someone can clarify...
thanks...
confused.gif

The first line of input tells you the number of test cases. Each line after that is one test case. Just look at the sample input and sample output; it's not hard to figure out.

Thanks...I was kind of confused...
Also, (1 ≤ T ≤ 100) isn't &#8804; ≤ in html?

This is a bug, but I actually don't know how to fix it. It's not very high on my list of things to do (right now I have to work on the problem setter interface), but if enough people complain about it on the forum, then maybe I'll think about it.