Sam writes down the numbers $1,$ $2,$ $\dots,$ $315,$ $316,$ $317,$ $\dots,$ $248,$ $249,$ $250.$

(a) How many digits did Sam write, in total?

(b) Sam chooses one of the digits written down at random. What is the probability that Sam chooses a $2$?

(a) If we ignore the commas, the numbers $1,$ $2,$ $\dots,$ $250$ have $2$ digits each, for a total of $250 \cdot 2 = 500$ digits. The numbers $251,$ $252,$ $\dots,$ $315$ have $3$ digits each, for a total of $65 \cdot 3 = 195$ digits. The numbers $316,$ $317,$ $\dots,$ $248,$ $249,$ $250$ also have $3$ digits each, for a total of $(250 - 316 + 1) \cdot 3 = 75$ digits. The commas add 249 digits. So the total number of digits is $500 + 195 + 75 + 249 = \boxed{1019}.$

(b) There are 250 digits total, and 45 of these are 2s, so the probability is $\frac{45}{250} = \boxed{\frac{9}{50}}.$