2 3
1 2源代码:#include <stdio.h> #include <stdlib.h> __int64 d[25]={0,0,1}; void cup() { int i; for(i=3;i<=20;i++) d[i] = (i-1)*( d[i-1] + d[i-2]); } int main() { int n; cup(); while(scanf("%d",&n)!=EOF) { printf("%I64d\n",d[n]); } system("pause"); return 0; }
原文地址:http://blog.csdn.net/zchlww/article/details/42711871