问题2539--Rooted Trees Problem

2539: Rooted Trees Problem

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

Give you two definitions tree and rooted tree. An undirected connected graph without cycles is called a tree. A tree is called rooted if it has a distinguished vertex r called the root. Your task is to make a program to calculate the number of rooted trees with n vertices denoted as Tn. The case n=5 is shown in Fig. 1.

输入

There are multiple cases in this problem and ended by the EOF. In each case, there is only one integer means n(1<=n<=40) .

输出

For each test case, there is only one integer means Tn.

样例输入 Copy

1
2
5

样例输出 Copy

1
1
9

来源/分类