P23310 [AtCoder] A Recursive Function
入门
题目描述

Problem Statement

A function f(x) defined for non-negative integer x satisfies the following conditions:

  • f(0) = 1;
  • $f(k) = k \times f(k-1)$ for all positive integers k.

Find f(N).

Input

The input is given from Standard Input in the following format:
N

Output

Print the answer as an integer.

Constraints

  • N is an integer such that $0 \le N \le 10$.

Sample Input 1

2

Sample Output 1

2

We have $f(2) = 2 \times f(1) = 2 \times 1 \times f(0) = 2 \times 1 \times 1 = 2$.

Sample Input 2

3

Sample Output 2

6

We have $f(3) = 3 \times f(2) = 3 \times 2 = 6$.

Sample Input 3

0

Sample Output 3

1

Sample Input 4

10

Sample Output 4

3628800

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2
样例输出
2