标签:
排列
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Description
Input
Output
Sample Input
Sample Output
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
unsigned long long c[20];
int n;
c[1]=0;
c[2]=1;
for(int i=3;i<=20;i++)
c[i]=(i-1)*(c[i-1]+c[i-2]);
while(scanf("%d",&n)==1)
printf("%llu\n",c[n]);
return 0;
}
标签:
原文地址:http://www.cnblogs.com/xl1164191281/p/4748761.html