2270. Prehistoric Operating Systems

单点时限: 2.0 sec

内存限制: 256 MB

It is the year 2254. Ohio Smith is a specialist in dealing with ancient operating systems. For research purposes, he tries to install several operating systems on his computer which were used about 250 years ago.

Prior research has yielded the result that the order those ancient operating systems is installed in does not matter most of the time. However, the operating system of a certain brand, the DOORS OS, has an interesting quirk: Two versions of DOORS cannot be installed in succession. There always has to be another operating system installed in between (for reasons that seem to be related to some entity called MBR, but Ohio is not yet sure of the details).

Ohio Smith wants to install n operating systems on his computer. In how many ways can he choose between DOORS and other operating systems?

You are given the number of operating systems that Ohio wants to install. Your task is to compute the number of valid OS install sequences.

输入格式

The first line contains the number of scenarios.

Every scenario consists of a single line containing the number 1 <= n <= 40 operting systems.

输出格式

The output for every scenario begins with a line containing “Scenario #i:”, where i is the number of the scenario starting at 1.

Then, for each scenario, print the number of possible installation sequences on a single line.

样例

Input
2
3
9
Output
Scenario 1:
5
Scenario 2:
89
Hint:
In the first example, there are 5 possible ways to install 3 operating systems:
1. DOORS, other, other
2. other, other, other
3. other, other, DOORS
4. other, DOORS, other
5. DOORS, other, DOORS

1 人解决,3 人已尝试。

1 份提交通过,共有 6 份提交。

9.9 EMB 奖励。

创建: 16 年,3 月前.

修改: 7 年,2 月前.

最后提交: 14 年,7 月前.

来源: TUD Programming Contest 2008 (Training Session), Darmstadt, Germ

题目标签