#19583: python輕鬆解


089487 (089487)


列表

l=[]
l.append(1)
l.append(1)
for i in range (2,1001):
l.append(i*l[i-1])
while True:
try:
n=int(input())
s=str(n)+'!'
print(s)
print(l[n])
except:
break

AC (30ms, 3.9MB)