Description: Enter a set of integers greater than or equal to 0, output according to the order from large to small, and if there is a sequential integer after sorting, only the maximum and minimum two numbers of consecutive numbers are output. All the integers you enter are different, that is, you do not have to consider the same conditions for two integers.
Run Time: Unlimited
Memory Limit: Unlimited
Input: A set of integers greater than or equal to 0, regardless of illegal input, separated by commas (",") between the integers, and the total input length is less than 100 bytes.
Output: After sorting, the individual integers are separated by commas (",").
Sample input: 1,4,7,2,5,8,9,11
Sample output: 11,9,7,5,4,2,1
Description: Enter a set of integers greater than or equal to 0, separated by commas (",") between the integers, the input total length is less than 4096, the output is removed after the repeated integer
Input: A set of integers separated by commas (",") between each integer
Output: separated by commas (",") between individual integers
Sample input: 9,9,2,3,6,5,2,21
Sample output: 9,2,3,5,21
Huawei Advanced Test 2015