[Problem]-avionics OJ-1465 is not easy one of the series, one of the oj-1465 Series
Problem Description we often feel that it is really not easy to do one thing well. Indeed, failure is much easier than success!
It is not easy to do the "one thing" thing well. If you want to succeed forever and never fail, it is even harder, just as spending money is always easier than making money.
Even so, I still want to tell you that it is not easy to fail to a certain extent. For example, when I was in high school, there was a magical girl who did all the 40 single-choice questions wrong during the English test! Everyone has learned probability theory and should know the probability of such a situation. So far, I think this is a magic thing. If we use a classic comment, we can conclude that it is not difficult for a person to make a wrong choice question. What is difficult is to make all the mistakes wrong or wrong.
Unfortunately, this kind of small probability event happened again, and it was around us:
This is the case -- HDU has a male student named 8006, who has made countless friends. Recently, this student played a romantic game and wrote a letter to each of the n netizens. This is nothing, the worst thing is, he put all the messages in the wrong envelope! Note: It's all wrong!
The question is: How many possible error methods are there for the poor 8006 students?
Input data contains multiple test instances. Each test instance occupies one row and each row contains a positive integer n (1
# Include <stdio. h >__ int64 value [21] = {0, 0, 1, 2}; int main () {for (int I = 4; I <= 20; I ++) value [I] = (I-1) * (value [I-1] + value [I-2]); int n; while (~ Scanf ("% d", & n) printf ("% I64d \ n", value [n]); return 0 ;}