문제1559--HandsShaking

1559: HandsShaking

실행시간 제한: 1 Sec  메모리사용 제한: 128 MB
제출: 163  통과: 70
[제출] [채점기록] [묻고답하기]

문제 설명

Consider a meeting of N distinguishable businessmen sitting around a circular table. To start the meeting, they must shake hands. Each businessman shakes the hand of exactly one other businessman. All handshakes happen simultaneously. We say that the shake is perfect if no arms cross each other. Given an int N, return the number of perfect shakes that exist for N businessmen. For example, there are two out of three ways for the case of N = 4:

 

입력 설명

The first line of the input gives the number of test cases, T. Then, T test cases follow. The first line of each test cases contains an even integer N (2 ≤ N ≤ 50) .

 

출력 설명

For each test case, output the answer on a separate line.

 

입력 예시 Copy

3
2
4
8

출력 예시 Copy

1
2
14

출처/분류