Problem: john purchased some shirts and trousers for $ 800 . he paid $ 400 less for the shirts than he did for the trousers . if he bought 5 shirts and the cost of a shirt is $ 20 less than that of a trouser , how many trousers did he buy ?
Rationale: given that the total purchase of two items cost 800 . so the average purchase of one item will cost 800 / 2 = 400 . its given as total shirt cost 400 $ less . hence total shirt cost = 400 - 200 and total trouser cost = 400 + 200 5 shirts = 200 $ = = > one shirt = 40 $ one trouser = 40 + 20 = 60 $ total trousers = 600 / 60 = 10 . e
annotated_formula: divide(subtract(800, multiply(5, add(20, 20))), add(add(20, 20), 20))