TopCoder

User's AC Ratio

98.1% (105/107)

Submission's AC Ratio

66.1% (125/189)

Tags

Description

TFcis的社員數,成長的非常快速,TFcis第N屆的人數,大約是N! (包括中午會出現的地下社員)
給你N,請你算出TFcis0~TFcisN每一屆的人數。

Input Format

輸入的第一行有一個正整數T (T<10),代表有幾組測資,接下來每一行有一組測資。
每組測資的有一行,包含一個非負整數N (N<13),代表第N屆。

Output Format

輸出TFcis0~TFcisN每一屆的人數,格式如Sample Output。

Sample Input 1

2
2
9

Sample Output 1

Case #1:
TFCIS0=1
TFCIS1=1
TFCIS2=2
Case #2:
TFCIS0=1
TFCIS1=1
TFCIS2=2
TFCIS3=6
TFCIS4=24
TFCIS5=120
TFCIS6=720
TFCIS7=5040
TFCIS8=40320
TFCIS9=362880

Hints

Problem Source

原TIOJ1180 / TFcis 10th留社考(prob B)。Problem Setter:seanwu。

Subtasks

No. Testdata Range Score
1 0 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 3000 65536 262144 1