C. Tính giai thừa


Submit solution

Points: 50
Time limit: 1.0s
Memory limit: 256M

Problem type

Mô tả:
Nhập số nguyên dương n (1 ≤ n ≤ 10^6). Tính n! (giai thừa của n).

Đầu vào:

  • Một số nguyên n.

Đầu ra:

  • Một số nguyên: giá trị giai thừa.

Bảng test case:

Input Output Giải thích
3 6 3! = 3 × 2 × 1 = 6
5 120 5! = 5 × 4 × 3 × 2 × 1 = 120
1 1 1! = 1

Comments

There are no comments at the moment.