N!

来源:互联网 发布:2015库里总决赛数据 编辑:程序博客网 时间:2024/04/27 22:53
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
123
 

 

Sample Output
126
 

 

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