If the volume is given in milliliters, you can use the combined formula for molarity to save time during the exam:
\[ M = \frac{\text{Weight of solute (g)} \times 1000}{\text{Molar mass of solute} \times \text{Volume of solution (mL)}} \]
Substituting: $M = \frac{5.85 \times 1000}{58.5 \times 500} = \frac{10 \times 1000}{100 \times 500} = 0.2\text{ M}$.