Prime=[1]*(10**5+1) Prime[0]=0 Prime[1]=0 for i in range(2,10**5+1): if Prime[i]==1: for j in range(2*i,10**5+1,i): Prime[j]=0 rui=[0] for i in range(1,10**5+1): rui.append(rui[-1]+Prime[i]) T=int(input()) for _ in range(T): N,P,Q=list(map(int,input().split())) M=rui[N] ans=M*P+(N-M)*(100-Q) print((M*P)/ans)