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

PROGRAMMING:Xiaoming's first playing card "magic" (queue or list operation)

Luz5年前 (2021-05-10)题库363
Xiao Ming just went to primary school, he learned the first "magic" of playing cards and performed everywhere. The content of magic is as follows:
He holds a stack of playing cards: A, 2,..., J, Q, K, a total of 13. He first carefully designed the order of them, then held them face down and began to perform.
He first took one from the bottom and put it on the top, then took one from the bottom and turned it on the open table; Then take one from the bottom and put it on the top. Then take one from the bottom and turn it on the open table. It's 2;
... so cycle until the hands of only one card, turn open the table, just K.
At this time, the order of cards on the table is: A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K
Please calculate the order of the cards in Xiao Ming's hand at the beginning.
Write the results, comma division, Xiaoming "magic" at the beginning, the bottom card output for the first data.
###Input format:
Enter the number of cards in this stack.
###Output format:
For each group of inputs, output the initial order of cards in a row (the bottom card output is the first data, number 1 represents a, number 11 represents J, number 12 represents Q, number 13 represents K).
###Input example:
Here is a set of inputs. For example:
```in
three
```
###Output example:
The corresponding output is given here. For example:
```out
2,1,3
```







answer:If there is no answer, please comment