前言
- 打表:猜出其所有的输入和输出,如果数据量不大,就可以用“打表”的办法编程
#include<iostream>
using namespace std;
int main(){
int a[14] = {0, 2, 7, 5, 30, 169, 441, 1872, 7632, 1740, 93313, 459901, 1358657, 2504881};
int k;
while (cin >> k && k)
cout << a[k] << endl;
}