← 返回 stripe 的题目列表Fixed Price Shipping Fee Calculation
类型:online_judge
Given several orders, each containing information: country, item, and quantity. Each item has a fixed unit shipping fee. Calculate the total shipping fee for all orders. Requirements:
Input format: each line is an order in the format "country, item, quantity" where quantity is a positive integer.
You can assume the unit shipping fee for each item is provided in an external dictionary, e.g., {"item1": 5, "item2": 10}.
Output format: a single integer representing the total shipping fee.
Test Cases
Input:
USA, item1, 2
Canada, item2, 3
Output:
40
Example
Input
USA, item1, 2
Canada, item2, 3
item_shipping_prices = {"item1": 5, "item2": 10}