题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2048
//C++代码
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int C,n,i;
double t,f[21];
f[1]=0,f[2]=1;
for(i=3;i<=20;i++) f[i]=(i-1)*(f[i-1]+f[i-2]);
cin>>C;
while(C--){
cin>>n;
t=1;
for(i=2;i<=n;i++) t*=i;
cout<<fixed<<setprecision(2)<<100*f[n]/t<<"%"<<endl;
}
return 0;
}