发布时间: 2017年6月19日 00:24 最后更新: 2017年6月20日 04:17 时间限制: 1000ms 内存限制: 64M

Cindy and Angela are good friends now. They can now go for an adventure without their dads. There are n houses with a road between every two houses in the village. The little girls decided to go to each house after dinner every evening as adventure.

They start from any house Cindy choose and return to the same house as an end of the adventure. But notice, Angela doesn't like to walk a long way,she's easy to get tired. So they don't want to pass the same road for twice in any one of the adventures. How many fresh adventures they may have during the vacation.I'm sure it's really an easy problem for you

There will be several test cases. And for each test case, there is one line of input containing n(1<=n<=50). A line containing 0 follows the last test case.

For each test case, output a line giving the number of ways.

复制

1 2 5 0

1 1 2