How many positive integers up to 2012 have the ones (units) digit either 1 or 8?
In every hundred, we will have 20 integers that satisfy this
So 20 (hundreds) * 20 ( occurnces in each hundred) = 400
And we have three more occurences from 2001 - 2012
So
400 + 3 =
403 occurences