+
附上AC代码:
#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
#include <iomanip>
#include <ctime>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
const double pi = acos(-1.0);
const double e = exp(1.0);
const int num[25] = {0, 0, 0, 4, 6, 0, 0, 12, 40, 0, 0, 171,
410, 0, 0, 1896, 5160, 0, 0, 32757, 59984,
0, 0, 431095, 822229};
int main()
{
ios::sync_with_stdio(false);
int n;
while (scanf("%d", &n)==1 && n!=0)
{
printf("%d %d\n", n, num[n]);
}
return 0;
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文:http://blog.csdn.net/silenceneo/article/details/47776555