All tasks
Mediumstrings

Capitalize Every Word

Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0

Statement

One line contains words of lowercase Latin letters separated by single spaces. Print the line with the first letter of every word capitalized.

Examples

Example 1
Input
hello world
Output
Hello World
Example 2
Input
a b
Output
A B

Constraints

  • Line length is between 1 and 10^5
  • There is at least one word
Solve this task to unlock the editorial.

AI tutor

Stuck? Get a nudge — the tutor explains the idea, it never hands you the solution.