11638 - 231001_11/9_practice8-2
|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
| Case 4 |
1 sec |
32 MB |
| Case 5 |
1 sec |
32 MB |
Description
-
It is basically the same as 231001_10/26_practice6-1, but in this exercise, the input change to the char, such as a, b, c,…, A, B, C,…, <, >, +, −,…, , !, #, :, @, $,…
-
Each character is using ASCII to store at the computer, as same as in you code. https://en.wikipedia.org/wiki/ASCII That is, each character has their own number, and the computer uses those numbers to compute or distinguish.
-
Input a positive integer n≦20, and then input n characters you need to store in an array.
-
Use ASCII to separate odd and even characters in other two arrays.
-
After you categorize into odd array and even array, you need to use ASCII to sort both arrays in descending order (from big to small), and then print out.
Input
Input: A positive integer n and n characters
Input format: After input n, it will change a new line to input n characters, and there is a space between two characters
Output
Output: The sorted odd array and even array
Output format:
-
Print the odd array first, and then the even array.
-
There is a space after each character, including the last character.
-
Change a new line after you print each array.
Tags