Problem1357--【函数】定义函数求n!(例题)

1357: 【函数】定义函数求n!(例题)

Time Limit: 1.000 Sec  Memory Limit: 128 MB
Submit: 149  Solved: 101
[Submit] [Status] [Web Board] [Creator:]

Description

例6.7       定义函数fa求n!。

Input

一个正整数n,n<=12。

Output

n的阶乘。

Sample Input

5

Sample Output

120

HINT

注意:用变量存放阶乘结果时,int范围只能计算到12的阶乘,long long只能计算到20的阶乘。



Source/Category


[Submit] [Status]