#P1595. 信封问题

信封问题

Description

Someone writes nn letters and has nn envelopes. If all letters are put into the wrong envelopes, how many different ways are there in total?

Input Format

A single integer nn, the number of envelopes, with n20n \le 20.

Output Format

A single integer representing the number of ways.

2
1
3
2

Hint

For 100%100\% of the testdata, 1n201 \le n \le 20.

Translated by ChatGPT 5