How many times will the digit 2 be used in numbering 250 pages of a book? (The page number starts from 1)
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.
I counted where the 2's will be occurring.
In the 1's position, a 2 will occur 1 time in each 10, so 25 times from 1 - 250. (2, 12, 22, 32... 242). In the 10's position, a 2 will occur 10 times in each 100, so 30 times in 3 batches: the 20's, the 120's and the 220's. In the 100's position, a 2 will occur 100 times in each 1000. In this case, however, our max number to count to is 250, so the 2 occurs only 51 times: 200, 201 ... 250.
A small gotcha is in the boundary condition of the 2's in the 100's position (not 50 but 51 occurrences)