标签:
Description
Input
Output
Sample Input
Sample Output
1 #include <stdio.h> 2 long long a[22]; 3 int main() 4 { 5 int n; 6 a[2]=1; 7 a[3]=2; 8 for(int i=4; i<=20; i++) 9 a[i]=(i-1)*(a[i-1]+a[i-2]); 10 while(scanf("%d",&n)==1) 11 { 12 printf("%lld\n",a[n]); 13 } 14 return 0; 15 }
标签:
原文地址:http://www.cnblogs.com/huangguodong/p/4743579.html