the average ( arithmetic mean ) of the 5 positive integers k , m , r , s , and t is 12 , and k < m < r < s < t . if t is 20 , 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 12 which means that in effect , all numbers are equal to 12 . if the largest number is 20 , it is 8 more than 12 . we need r to be maximum so k and m should be as small as possible to get the average of 12 . since all the numbers are positive integers , k and m can not be less than 1 and 2 respectively . 1 is 11 less than 12 and 2 is 10 less than 12 which means k and m combined are 21 less than the average . 20 is already 8 more than 12 and hence we only have 21 - 8 = 13 extra to distribute between r and s . since s must be greater than r , r can be 12 + 6 = 18 and s can be 12 + 7 = 19 . so r is 18 . answer ( d )"
subtract(divide(subtract(multiply(12, 5), 20), const_2), const_2)