Safe Salutations
Problem
As any minimally superstitious person knows all too well, terriblethings will happen when four persons do a crossed handshake.
You, an intrepid computer scientist, are given the task of easing theburden of these people by providing them with the feasible set ofhandshakes that include everyone in the group while avoiding any suchcrossings. The following figure illustrates the case for 3 pairs ofpersons:
Input
The input to this problem contains several datasets separated by a blank line. Each dataset is simply an integern, the number ofpairs of people in the group, with 1 ≤ n ≤ 10.
Output
The output is equally simple. For each dataset, print a single integer indicating the numberof possible crossless handshakes that involve everyone in a groupwithn pairs of people. Print a blank line between datasets.
Sample Input
4
Sample Output
14
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索input
, dataset
, output
, sample
The
保时捷991、yy991、91、991路公交车路线、911,以便于您获取更多的相关知识。