HDU 1443 Joseph

打表水过:

#include<iostream>  
using namespace std;  
int n;  
long long a[20] = {0,2,7,5,30,169,441,1872,7632,1740,93313,459901,1358657,2504881,0};  
int main()  
{  
    while(cin>>n && n!=0){  
      cout<<a[n]<<endl;  
    }  
    return 0;  
}
原文地址:https://www.cnblogs.com/forever97/p/3520924.html