Problem: all numbers from 1 to 200 ( in decimal system ) are written in base 6 and base 7 systems . how many of the numbers will have a non - zero units digit in both base 6 and base 7 notations ?
Rationale: detailed solution if a number written in base 6 ends with a zero , it should be a multiple of 6 . in other words , the question wants us to find all numbers from 1 to 200 that are not multiples of 6 or 7 . there are 33 multiples of 6 less than 201 . there are 28 multiples of 7 less than 201 . there are 4 multiples of 6 & 7 ( or multiple of 42 ) from 1 to 200 . so , total multiples of 6 or 7 less than 201 = 33 + 28 - 4 = 57 . number of numbers with non - zero units digit = 200 - 57 = 143 . correct answer : a
annotated_formula: subtract(200, subtract(add(divide(200, 6), divide(200, 7)), divide(200, multiply(6, 7))))