P1595 Envelope Problem
Description
Someone writes $n$ letters and has $n$ envelopes. If all letters are put into the wrong envelopes, how many different ways are there in total?
Input Format
A single integer $n$, the number of envelopes, with $n \le 20$.
Output Format
A single integer representing the number of ways.
Explanation/Hint
For $100\%$ of the testdata, $1 \le n \le 20$.
Translated by ChatGPT 5