P28193 [洛谷] Envelope Problem
普及
题目描述

Problem Description

Someone has written $n$ letters and prepared $n$ envelopes. If all the letters are mistakenly placed in the wrong envelopes, calculate the total number of different scenarios where all letters are misplaced.

Input Format

A single integer $n$, representing the number of envelopes, with the guarantee that $n \le 20$.

Output Format

A single integer, representing the number of different scenarios where all letters are misplaced.

Sample Input and Output

Sample Input #1

2

Sample Output #1

1

Sample Input #2

3

Sample Output #2

2

Notes

For $100\%$ of the data, $1 \le n \le 20$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2
样例输出
1