{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"给出的是一副有序的n张牌,编号为1至n,牌1在上,牌n在下。只要这副牌中至少有两张牌,就可以进行以下操作。\n\n扔掉最上面的一张牌 然后把现在在最上面的那张牌移到最下面去.\n\n你的任务是找到被丢弃的牌和最后一张剩余的牌的顺序。\n\n每一行输入(除了最后一行)都包含一个数字n≤50。最后一行包含0,这一行不应该被处理。对于输入的每个数字产生两行输出。第一行显示被丢弃的牌的序列,第二行报告最后剩下的牌。任何一行都不会有前导或尾部的空格。参见示例中的预期格式。"}},{"title":"Sample input","value":{"format":"MD","content":"7\n19\n10\n6\n0"}},{"title":"Output","value":{"format":"MD","content":"Discarded cards: 1, 3, 5, 7, 4, 2\nRemaining card: 6\nDiscarded cards: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 4, 8, 12, 16, 2, 10, 18, 14\nRemaining card: 6\nDiscarded cards: 1, 3, 5, 7, 9, 2, 6, 10, 8\nRemaining card: 4\nDiscarded cards: 1, 3, 5, 2, 6\nRemaining card: 4\n"}},{"title":"","value":{"format":"MD","content":"Folklore, adapted by Piotr Rudnicki"}}]}