Calculate Factorial


Submit solution

Points: 20 (partial)
Time limit: 5.0s
Memory limit: 64M

Authors:
Problem types

題目說明

請輸入一整數N,並輸出該數的階乘 若輸入的整數小於0輸出"wrong!"並且終止程式

※階乘規則: 1x2x3x...xn

輸入限制: 數字

輸入

整數N

輸出

N的階乘

sample input1

5

sample output1

120

sample input2

-8

sample output2

wrong!

Comments

There are no comments at the moment.