at a supermarket , john spent 1 / 2 of his money on fresh fruits and vegetables , 1 / 3 on meat products , and 1 / 10 on bakery products . if he spent the remaining $ 5 on candy , how much did john spend at the supermarket ?
"let ' s let t = total number of dollars spent at the supermarket . with this variable we can set up an equation and determine t . we are given that john spent 1 / 2 of his money on fresh fruits and vegetables , or ( 1 / 2 ) t , 1 / 3 on meat products , or ( 1 / 3 ) t , and 1 / 10 on bakery products , or ( 1 / 10 ) t . we are also given that he spent the remaining $ 5 on candy . since we know where all his money was allocated , we can sum these values together and set the sum to t . so we have : ( 1 / 2 ) t + ( 1 / 3 ) t + ( 1 / 10 ) t + 5 = t to get rid of the fractions we can multiply the entire equation by 30 , and we obtain : 15 t + 10 t + 3 t + 150 = 30 t 28 t + 150 = 30 t 150 = 2 t t = 75 john spent $ 7 at the supermarket . answer : a"
divide(5, subtract(1, add(add(divide(1, 10), divide(1, 3)), divide(1, 2))))