九度教程第94题
C语言源码:[cpp]#include<stdio.h>long long a[21];int main(){int n,i;a[2]=1;a[3]=2;for(i=4;i<=20;i++)a[i]=(i-1)*(a[i-1]+a[i-2]);while(scanf("%d",&n)!=EOF)printf("%lld\n",a[n]);}
补充:软件开发 , C++ ,
C语言源码:[cpp]#include<stdio.h>long long a[21];int main(){int n,i;a[2]=1;a[3]=2;for(i=4;i<=20;i++)a[i]=(i-1)*(a[i-1]+a[i-2]);while(scanf("%d",&n)!=EOF)printf("%lld\n",a[n]);}
补充:软件开发 , C++ ,