Python(2.7.3) 解法, 执行用时: 13ms, 内存消耗: 2816K, 提交时间: 2018-01-04 07:37:47
a=int(input()) s=1 while a>0: s=s*a a=a-1 print(s)
pypy3 解法, 执行用时: 57ms, 内存消耗: 27676K, 提交时间: 2022-08-13 22:55:02
import math n=int(input()) print(math.factorial(n))
Python3 解法, 执行用时: 45ms, 内存消耗: 4836K, 提交时间: 2023-07-10 11:10:56
import math print(math.factorial(int(input())))