#include<bits/stdc++.h>
using namespace std;
int n,x,cnt;
vector<bool> chk;
vector<int> v;
void bt(int i)
{
if(i>n){
int mx=0;
for(int i=1;i<x;i++) mx=max(mx,v[i]);
for(int i=x;i<=n;i++)
if(v[i]>mx){
if(v[i]==n) cnt++;
return;
}
}
for(int j=1;j<=n;j++){
if(chk[j]) continue;
chk[j]=1; v.push_back(j);
bt(i+1);
v.pop_back(); chk[j]=0;
}
}
void solve()
{
int p=1;
for(int i=1;i<=n;i++) p*=i;
chk.resize(n+1,false);
v.clear();
v.push_back(0);
int xx=0,q=0;
for(x=1;x<=n;x++){
cnt=0;
bt(1);
if(cnt>q) xx=x, q=cnt;
}
cout << (n<10?" ":" ") << n << " " << xx-1
<< " " << (double)(xx-1)/n
<< " " << (double)q/p*100 << "%\n";
}
int main()
{
cout << fixed; cout.precision(2);
cout << "\n 지원자 수 | 넘김 횟수 | 넘김/지원자 | 성공 확률\n";
cout << " -----------------------------------------------\n";
for(n=1;n<=10;n++) solve();
cout << "\n Made By Heewon ";
}