CAPS - CAPS ON
Alice gives a simple task to Bob. The task is as follows: Given a string, Bob has to capitalize the first letter of every word in the string AND also replace the spaces between words by underscore("_"). Alice gives Bob a string containing lowercase words separated by one or more space characters and Bob should return a string that is same as the string except with the first character of each word capitalized and space replaced by underscore.
Input
First line of input contains T, the number of test cases. The following T lines contain input strings each on a new line.
Output
Print the test case index followed by the processed string.
Constraints
- The string may have leading or trailing spaces.
- The string will contain between 1 and 50 characters, inclusive.
- Each character of string will either be a space or a lowercase letter ('a' to 'z').
- T is less than 50.
Example
Input: 4 the hobbit an unexpected journey dream share innovate a Output: Case#1: The_Hobbit Case#2: An_Unexpected___Journey Case#3: Dream_Share_Innovate Case#4: A
hide comments
:D:
2013-02-06 09:42:04
First of all, moving to tutorial since it's trivial. Second internal error is probably due to some bad settings in the problem. Hiding it for now. Author please check this, especially judge settings. |
|
Rishikesh Jha:
2013-02-06 09:42:04
All solutions have been rejudged. |
|
Ranker:
2013-02-06 09:42:04
What is internal error?? I am getting it every time I submit!
|
Added by: | Rishikesh Jha |
Date: | 2013-02-06 |
Time limit: | 0.100s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | BIT Mesra, CQM |