ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Chapter 3. Repetition structures > задача:


05. Factorial

Гость
• Вопросы к жюри (1)

Задачи сборника

• Flowchart 3
• Sum until 0
• Sum less than N
• Sum of N numbers
• Степень двойки
• 01. How many digits?
• 02. How many divisors?
• 04. Поезд
• 05. Factorial
• 06. X to the power of Y
• 07. Fibonacci Series
• 08. Binary to decimal
• 09. Decimal to binary
• 10. Maximum
• 11. Perfect numbers
• 12. Wonder primes
• 13. Round numbers

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 1000/1000/1000/1000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

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