import sys read=sys.stdin.buffer.read readline=sys.stdin.buffer.readline readlines=sys.stdin.buffer.readlines mx=500 dp=[0]*mx dp[0]=1.0 dpe=[0]*mx for i in range(1, mx): dpe[i]=1.0 for j in range(1, 7): if i-j>=0: dp[i]+=dp[i-j]/6.0 dpe[i]+=dpe[i-j]/6.0 t=int(readline()) for _ in range(t): n=int(readline()) if n