poj1012

简单题,打表

View Code
#include <iostream>
using namespace std;

int        ans[] = {0, 2, 7, 5, 30, 169, 441, 1872, 7632, 1740, 93313, 459901, 1358657, 2504881}, n;

int main()
{
    while (cin >> n && n != 0)
        cout << ans[n] << endl;
    return 0;
}

 

posted @ 2012-12-10 12:30  undefined2024  阅读(156)  评论(0)    收藏  举报