if w is the set of all the integers between 35 and 64 , inclusive , that are either multiples of 3 or multiples of 2 or multiples of both , then w contains how many numbers ?
"official solution : number of multiples of 3 step 1 . subtract the extreme multiples of 3 within the range ( the greatest is 63 , the smallest is 36 ) : 63 - 36 = 27 step 2 . divide by 3 : 27 / 3 = 9 step 3 . add 1 : 9 + 1 = 10 . so there are 10 multiples of 3 within the range : examples are 51 , 54 , 57 , 60 , etc . number of multiples of 2 step 1 . subtract the extreme multiples of 2 within the range ( the greatest is 64 , the smallest is 36 ) : 64 - 36 = 28 step 2 . divide by 2 : 28 / 2 = 14 step 3 . add 1 : 14 + 1 = 15 . so there are 15 multiples of 2 within the range : examples are 50 , 52 , 54 , 56 , 58 , 60 etc . add the 10 multiples of 3 and the 15 multiples of 2 : 10 + 15 = 25 . however , by adding the multiples of 2 and the multiples of 3 , we are effectively counting several numbers twice : for example , 54 and 60 are parts of both the lists above . so we ca n ' t just take 10 + 15 = 25 . find the number of multiples of 6 ( which are the double counted , as 6 is divisible by both 2 and 3 ) , and subtract it from 25 : step 1 . subtract the extreme multiples of 6 within the range ( the greatest is 72 , the smallest is 54 ) : 60 - 30 = 30 step 2 . divide by 6 : 30 / 6 = 5 step 3 . add 1 : 5 + 1 = 6 . so there are 6 multiples of 6 within the range : we counted 6 numbers twice . subtract the 6 multiples of 6 from the sum of the multiples of 2 and 3 : = 10 + 15 - 6 = 25 - 6 = 19 therefore , the final number of multiples of 2 , 3 or 6 is 19 . hence , this is the correct answer . ( b )"
subtract(add(floor(divide(subtract(64, 35), 3)), divide(subtract(64, 35), 2)), floor(divide(subtract(64, 35), multiply(2, 3))))