q and r are two - digit positive integers that have the same digits but in reverse order . if the positive difference between q and r is less than 30 , what is the greatest possible value of q minus r ?
a two - digit integer ` ` ab ' ' can be expressed algebraically as 10 a + b . q - r = ( 10 a + b ) - ( 10 b + a ) = 9 ( a - b ) < 30 . the greatest multiple of 9 which is less than 30 is 27 . the answer is e .
multiply(reminder(30, subtract(const_10, const_1)), subtract(const_10, const_1))