Files

16 lines
190 B
Python
Raw Permalink Normal View History

2023-06-20 09:22:53 +08:00
"""
输入非负整数n计算n!
Version: 0.1
Author: 骆昊
Date: 2018-03-01
"""
n = int(input('n = '))
result = 1
for x in range(1, n + 1):
result *= x
print('%d! = %d' % (n, result))