String Buff

View as PDF

Submit solution

Points: 10
Time limit: 30.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Java

Given a string S, first you must remove/delete all of the spaces within the string. Then, turn all digits in the string to hash tags (#). Then make the string an even length (if it is not already even), by adding an underscore (_) character to the end of the string. Finally, insert the carat (^) character in the middle of the string.

Input Specification

The first and only line of input will be the string, S.

Output Specification

Output the modified version of S.

Sample Input 1

Hello World

Sample Output 1

Hello^World

Sample Input 2

Hi there everyone!!

Sample Output 2

Hithereev^eryone!!_

Sample Input 3

You're number 1 or 2

Sample Output 3

You'renu^mber#or#

Comments

There are no comments at the moment.