For a pure substance (both solids and liquids),
`["Pure substance"] = ("Number of moles")/("Volume")`
`= ("Mass"//"molecular mass")/("Volume")`
`= ("Mass")/("Volume" xx "Molecular mass")`
`= ("Density")/("Molecular mass")`
Now, the molecular mass and density (at a particular temperature) of a pure substance is always fixed and is accounted for in the equilibrium constant. Therefore, the values of pure substances are not mentioned in the equilibrium constant expression.