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

PROGRAMMING:Insertion of incremental sequence

Luz5年前 (2021-05-10)题库479
Insertion of incremental sequence
Given that the order table L is incrementally ordered, insert x into the appropriate position of Table L, and ensure that table L is ordered in all test data.
###Input format
There is only one set of data, which is divided into three lines. In the first line, enter the length of the sequence table (no more than 100), in the second line, enter the incremental sequence table L, and in the third line, enter the data element X to be inserted. All data are integers up to 10000.
###Output format:
For each set of inputs, the incrementing sequence table after X is inserted is output in one row (the data are separated by commas).
###Input sample
```in
five
1 3 5 7 9
six
```
###Output sample
```out
1,3,5,6,7,9
```






answer:If there is no answer, please comment