Poj Solution 1012

http://poj.org/problem?id=1012

#include<iostream>
using namespace std;

int a;
int table[] = {0,2,7,5,30,169,441,1872,7632,1740,93313,459901,1358657,2504881,13482720};
int main(){
while(cin>>a && a){
   cout<<table[a]<<endl;
}
return 0;
}


											
This entry was posted in poj. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *