Recently, your boss decided that all sales that your company makes should be in the form of "BUY X GET Y FREE", where X and Y are integers. For example, rather than advertising that your latest product is on sale for $4.00, when it normally sells for $6.00, he wants you to advertise it as a "BUY 2 GET 1 FREE" sale.
Given regular, the normal price of the item, and sale, the sale price of the item
, return a String formatted as "BUY X GET Y FREE" (quotes for clarity only), where X and Y are positive integers with no leading zeroes. X and Y must be as small as possible (for example, return "BUY 2 GET 1 FREE" instead of "BUY 4 GET 2 FREE").
|