the average ( arithmetic mean ) of the 5 positive integers k , m , r , s , and t is 16 , and k < m < r < s < t . if t is 42 , what is the greatest possible value of the median of the 5 integers ?
we need to find the median which is the third value when the numbers are in increasing order . since k < m < r < s < t , the median would be r . the average of the positive integers is 16 which means that in effect , all numbers are equal to 16 . if the largest number is 42 , it is 26 more than 16 . we need r to be maximum so k and m should be as small as possible to get the average of 16 . since all the numbers are positive integers , k and m can not be less than 1 and 2 respectively . 1 is 15 less than 16 and 2 is 14 less than 16 which means k and m combined are 29 less than the average . 42 is already 26 more than 16 and hence we only have 29 - 26 = 3 extra to distribute between r and s . since s must be greater than r , r can be 16 + 1 = 17 and s can be 16 + 2 = 18 . so r is 17 . answer ( a )
subtract(divide(subtract(multiply(16, 5), 42), const_2), const_2)