标签:
Description
Input
Output
Sample Input
Sample Output
#include <stdio.h> int main() { long long n,a[55]={0,0,1,2},i; while(scanf("%lld",&n)!=EOF) { for(i=3;i<=n;i++) a[i]=(i-1)*a[i-1]+(i-1)*a[i-2]; printf("%lld\n",a[n]); } return 0; }
标签:
原文地址:http://www.cnblogs.com/zhangfengnick/p/4423200.html