report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
String normalization - MarisaOJ: Marisa Online Judge

String normalization

Time limit: 1000 ms
Memory limit: 256 MB
Given a string $S$ consisting of letters and spaces, perform string normalization as follows: - Remove leading and trailing spaces. - Remove any extra spaces between words. - Capitalize the first letter of each word and convert the rest of the letters to lowercase. Write a program that takes as input a string and outputs the normalized string. ### Input - A single line containing the string $S$. ### Output - Print the normalized string $S$. ### Constraints - $1 \le |S| \le 1000$. ### Sample test ``` A qUick BRown fOX ``` Output: ``` A Quick Brown Fox ```
String
Length
Word Count
lowercase
Vowel
Digit sum
Strong password
Letter frequencies
Palindrome string
Palindrome substring
Caesar cipher
String occurences
Sum
String normalization
Run-length encoding
Expression
Topic
Basic
Rating 800
Solution (0) Solution