Tính giai thừa

View as PDF



Problem type
Allowed languages
Assembly, Awk, Brain****, C, C++, Java, Pascal, Perl, Python, SCRATCH, Sed, Text
Points: 1 (p) Time limit: 1.0s Memory limit: 1000M Input: stdin Output: stdout

\(N!\) được gọi là \(N\) giai thừa, là tích các số tự nhiên liên tiếp từ \(1\) đến \(N\).
Ví dụ: \(N = 4\) thì \(4! = 24\)

Yêu cầu

Viết chương trình tính giá trị của \(N!\)

Dữ liệu vào

  • Dòng \(1\): Ghi duy nhất một số nguyên dương \(n\) (\(1 < N \leq 20\))

Dữ liệu ra

  • Dòng \(1\): Ghi ra giá trị của \(N!\)
Sample
Input
5
Output
120

Comments

Most recent
Loading comments...

There are no comments at the moment.