NewThe Learning module is now liveSee what's new

A shop records prices manually when products are sold. You are given distinct catalog product names in products and their correct prices in productPrices. You are also given the sold products in productSold and the prices entered for those sales in soldPrice. Every value in productSold appears in products.

For every sale at index j, productSold[j] identifies the product and soldPrice[j] is its entered price. Its correct price is the corresponding value in productPrices.

Test Cases
Input
Output
Expected