• [1260] Where is XiSi

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • The question is so easy. Now the leader have met N students. And all their questions are different.
    Now the leader forgot the right sequence of them, he needs your help to find how many kinds of situations which linking their names to their words will be that nobody's name is linked to his own word (For example, the Kth student will ask Kth question, so every situation should be that Kth question can not be linked to Kth student).
  • 输入
  • Input until EOF.
    Each test contains one integer N(2<=N<=12).
  • 输出
  • Output the number of situations that nobody's name is linked to his own word.
  • 样例输入
  • 2
    3
    4
  • 样例输出
  • 1
    2
    9
    
  • 提示
  • 来源
  • hungar
  • 操作

显示春菜