#C10429. Calculate Shipping Cost
Calculate Shipping Cost
Calculate Shipping Cost
You are given the weight of a shipment in kilograms (n) and two shipping cost rates: one for standard shipping and one for express shipping. If (n < 10), then the shipping cost is calculated using the standard rate; otherwise, the express rate is applied. The cost is computed as follows:
[ \text{Cost} = \begin{cases} n \times \text{standard rate}, & \text{if } n < 10 \ n \times \text{express rate}, & \text{if } n \ge 10 \end{cases} ]
Your task is to compute and output the total shipping cost based on the input provided.
inputFormat
The input is read from standard input (stdin) and consists of two lines. The first line contains an integer (n), representing the number of kilograms to ship. The second line contains two space-separated integers representing the cost per kilogram for standard shipping and express shipping respectively.
outputFormat
Output the total shipping cost as a single integer to standard output (stdout).## sample
7
5 10
35
</p>