Strategy: First find the numbers that do not contain a 4 in this range and then subtract all the multiples of 4 from it.agarwalva wrote:how many of the integers between 1 and 400 , inclusive are not divisible by 4 and do not contain any 4s as a digit
Please post explanation
How many numbers between 1 and 400 do not contain 4 as a digit?
one-digit numbers: 8
two digit numbers: 8C1*9C1 = 72
three-digit numbers: 3C1*9C1*9C1 = 243
Total = 8 + 72 + 243 = 323
Which numbers between 1 and 400 are multiples of 4 and do not contain 4?
Numbers ending in 08,12,16,20,28,.. etc
Strategy: Find all the multiples of 4 and then subtract those that contain a 4. These numbers will then be subtracted from 323 to get the required answer.
From 00 to 99, there are a total of 25 multiples of 4 but 7 of them (04, 24, 40, 44, 48, 64, 84) contain 4 in them.
So, there are (25 - 7 =) 18 numbers from 00 to 99 that do not contain a 4 but are multiples of 4.
There will be 18 numbers each between (00 - 99), (100 - 199).. (300 - 399)
So, 4*18 = 72 numbers in all.
Number of numbers from 1 to 400 that do not contain a 4 and are not multiples of 4
= 323 - 72
= 251

















