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

PROGRAMMING:Switch seats

Luz5年前 (2021-05-10)题库487
After the final exam, the automation class had a dinner party, where ZJ and Xiaohui ate at the same table. ZJ wants to sit on the left side of Xiaohui's classmate, so she needs to exchange places with the classmate on Xiaohui's left. For the convenience of solving the problem, suppose there are 10 students at this table, each of them has a seat number (No. 1-10) in their hands, and ask No. 2 to sit on the right side of No. 1, No. 3 to sit on the right side of No. 2... And No. 1 to sit on the right side of No. 10. If we know that ZJ's seat number is n and Xiaohui's seat number is m, what's the seat arrangement after the exchange.
###Input format:
Input multiple sets of test data n, M.
###Output format:
Start with seat number 1 and output the seat number held by the students in the seat in turn. Each seat number is followed by a space. Each group of test data is displayed on different lines.
###Input example:
Here is a set of inputs. For example:
```in
1 3
2 4
```
###Output example:
The corresponding output is given here. For example:
```out
2 1 3 4 5 6 7 8 9 10
1 3 2 4 5 6 7 8 9 10
```







answer:If there is no answer, please comment