HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Factorial

Guest
• Review clarifications (1)

Section problems

• A to the power of B
• A Palace with Many Columns
• X to the power of Y
• A+B
• T-shirts
• SAME OR DIFFERENT
• GCF
• REVERSE ORDER OF WORDS
• Factorial
• Maximum
• Name-Surname
• Decimal to binary
• Heap
• Herons
• Leap Year
• Perfect numbers
• Rectangle

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.

Problem description

The factorial of a non-negative integer n is the product of the positive integers less than or equal to n. This is written as "n!", and pronounced "n factorial". 0!=1, 1!=1, 2!=2, 3!=6, 4!=24, 5!=120. Write a program that reads a non-negative integer from the standard input and computes its factorial.

Input

There is a single integer N on the first line of input (0 ≤ N ≤ 20).

Output

Write value of N!.

Example

stdin stdout

3

6

Для отправки решений необходимо выполнить вход.

www.contester.ru