An integer is chosen at random from 0 to 2016 inclusive. If the probability that the digit 0 appears exactly once can be written as , where and are coprime positive integers , find .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There are:
a) 9 numbers between 1 and 99 with exactly one 0 digit (as only the second digit can be 0 and we can choose the first digit 9 ways, we get 10, 20, ... , 80, 90)
b) 162 numbers between 100 and 999 with exactly one 0 digit (as we can choose the first digit 9 ways, the place of the 0 digit 2 ways (either the second or the third digit can be 0) and the other non-zero digit 9 ways (from 1 to 9), 9 × 2 × 9 = 162)
c) 243 numbers between 1000 and 1999 with exactly one 0 digit (the reasoning is similar to b), but here we can choose the first digit 1 way (1), the place of the 0 digit 3 ways (either 2nd, 3rd or 4th) and the other two non-zero digit 9 ways (from 1 to 9) each, 3 × 9 × 9 = 243)
d) 6 numbers between 2000 and 2016 with exactly one 0 digit (from 2011 to 2016)
e) 1 one digit number: the 0 .
This means, that the total number of integers between 0 and 2016 with exactly one 0 digit is:
9 + 162 + 243 + 6 + 1 = 421
Since the number of integers between 0 and 2016 is 2017, the probability of getting one, which has exactly one 0 digit, when choosing randomly is:
p = 2 0 1 7 4 2 1
Because 421 and 2017 are coprimes, therefore a = 421, b = 2017 and
a + b = 4 2 1 + 2 0 1 7 = 2 4 3 8