Problem2721--阶乘

2721: 阶乘

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 135  Solved: 98
[Status] [Submit] [Creator:]

Description

我们定义 n! = n × (n-1) × …… × 2 × 1,读作 ”n 的阶乘”。  

定义一个 long long f(int n) 函数返回 n! 问题。  

Input

一个整数 n(1 ≤ n ≤ 15)。

Output

一个整数,表示 n!。  

注意:f 函数的返回值定义为 long long 是因为答案比较大,会超 int。  

Sample Input Copy

5

Sample Output Copy

120

Source/Category