document.write( "Question 1173934: Find how many numbers are between 1 and 2019 , such that number is a multiple of 5 and contains digit 5 \n" ); document.write( "
Algebra.Com's Answer #799272 by greenestamps(13200)\"\" \"About 
You can put this solution on YOUR website!


\n" ); document.write( "You learn nothing, and your brain gets no exercise, from our doing this problem for you.

\n" ); document.write( "So I will show you an organized way to do the counting and let you find the answer.

\n" ); document.write( "Note there is no magic formula that will find this answer for you.

\n" ); document.write( "You could write a computer program to find the answer; and writing that program would be an excellent exercise. But that is not what they want you to do.

\n" ); document.write( "But other than that, the way to find the answer is to find an organized way to count the numbers so that you count each one once and only once.

\n" ); document.write( "Numbers that are multiples of 5 have units digit either 5 or 0. Split the process of counting the numbers you are looking for into those two cases.

\n" ); document.write( "(1) Numbers 1 ... 2019 with units digit 5: 5, 15, 25, ..., 2015. Count them.

\n" ); document.write( "(2) Numbers 1 ... 2019 with units digit 0 and some digit 5....

\n" ); document.write( "(2a) Numbers with 5 in the tens place and 0 in the units place: count them
\n" ); document.write( "(2b) Numbers with 5 in the hundreds place and 0 in the units place: count them
\n" ); document.write( "(2c) Numbers with 5 in BOTH the tens place and hundreds place: count them

\n" ); document.write( "The numbers with 0 in the units place and 5 in both the tens and hundreds places were counted twice in steps (2a) and (2b). So those numbers, counted in step (2c), must be subtracted from the total.

\n" ); document.write( "The answer to the problem is then the numbers from

\n" ); document.write( "(1) + ((2a)+(2b)) - (2c)

\n" ); document.write( "
\n" ); document.write( "
\n" );