aishwarya rai walks into a bank to cash out her check . by mistake the bank teller gives her dollar amount in change , and her cent amount in dollars . on the way home she spends 5 cent , and then suddenly she notices that she has twice the amount of her check . how much was her check amount ?
e the check was for dollars 31.63 . the bank teller gave her dollars 63.31 she spent . 05 , and then she had dollars 63.26 , which is twice the check . let x be the dollars of the check , and y be the cent . the check was for 100 x + y cent he was given 100 y + x cent also 100 y + x - 5 = 2 ( 100 x + y ) expanding this out and rearranging , we find : 98 y = 199 x + 5 or 199 x ≡ - 5 ( mod 98 ) or 98 * 2 * x + 3 x ≡ - 5 ( mod 98 ) 3 x ≡ - 5 ≡ 93 ( mod 98 ) this quickly leads to x = 31
divide(multiply(subtract(const_1, divide(5, subtract(const_100, const_2))), subtract(const_100, const_2)), const_3)