Solving unit price problem