String analysis
Time limit1sMemory limit256 MB
Count the lowercase letters, uppercase letters, digits, and spaces in each input line until end of input.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
You are given strings. Write a program that counts the lowercase letters, the uppercase letters, the digits, and the spaces in each string.
Every string consists only of lowercase letters, uppercase letters, digits, and spaces.
Input
From the first line to the -th line, one string is given per line. () No string is longer than 100 characters.
is not given separately, so read until the input ends. A string can also begin or end with spaces.
Output
For each string, print on one line the number of lowercase letters, uppercase letters, digits, and spaces, separated by single spaces. Keep the order in which the strings are given.