51nod1057(python2计算n!)

题目链接:www.51nod.com/onlineJudge/questionCode.html#!problemId=1057

 

思路:直接for循环呗~

 

代码:

1 n = int( raw_input() );
2 ans = 1;
3 for i in range(2,n+1):
4     ans *= i;
5 print ans;

 

posted @ 2016-12-16 19:14  geloutingyu  阅读(157)  评论(0编辑  收藏  举报