P1149 [NOIP 2008 提高组] 火柴棒等式 题解

· · 个人记录

打表出奇迹!!,没错今天给大家看一道非常简单的打表类水题

#include <bits/stdc++.h>
using namespace std;
int a[25]={0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,8,9,6,9,29,39,38,65,88,128},n;//计算
int main(){
    cin>>n;
    cout<<a[n];//输出
}

完美!