-->
当前位置:首页 > 题库

PROGRAMMING:Count the number of characters and output letters

Luz5年前 (2021-05-10)题库402
For the input of a line of characters, the number of various types of characters is counted, and the case of the letters is exchanged and output.
###Input format:
Input all kinds of characters in one line (end of line with newline character), and the total number of characters shall not be less than 1 and no more than 2000.
###Output format:
The output is in two lines: < br > 0
First, according to the order of input, the case of the letters is interchanged, and then output on the first line
Then count the number of input characters, and output them in the second line according to the format of 'letters: < l >, digits: < d >, spaces: < s >, others: < o > "< br>
be careful
1. Count the number of characters, excluding the newline character at the end of the line;
1. In the above format, '< l > < d > < s > < o >' respectively represents the number of letters, numbers, spaces and other characters, and the actual number is used to replace the output;
1. In the first line, only the case reversed letters are output, and no other characters are output;
1. Output in strict accordance with the specified format, and do not increase or decrease the space, newline and other characters at will.
###Input example:
```in
ABC xyz 123 ?!
```
###Output example:
```out
abcXYZ
letters:6 , digits:3 , spaces:3 , others:2.
```







answer:If there is no answer, please comment