This question requires the preparation of procedures , Calculation N The factorial .
Input format : Input gives a positive integer on a line N.
Output format : In a row, press “product = F” Output the value of factorial in the format of F, Please note that there is a space to the left and right of the equal sign . The calculation results should not exceed the double precision range .
sample input :
5
sample output :
product = 120 x = int(input()) a = 1 for i in range(1, x+1): a = a*i print("product = %d" % float(a))
That's all for this sharing , If it helps you , Give me a compliment before you go ~