现在的位置: 首页 > 综合 > 正文

N!

2013年02月16日 ⁄ 综合 ⁄ 共 1352字 ⁄ 字号 评论关闭
Problem Description
Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!
 

 

Input
One N in one line, process to the end of file.
 

 

Output
For each N, output N! in one line.
 

 

Sample Input
1 2 3
 

 

Sample Output
1 2 6
 

 

Author
JGShining(极光炫影)
分析: 要注意时间限制,特别当位数很大时,要进行的乘法操作也会很大!解决方法是每三位进行一次乘法操作!
参考答案:
 

抱歉!评论已关闭.