#P104. 练18.4 计算邮资
练18.4 计算邮资
Description
Calculate the postage based on the weight of the mail and whether the user chooses express delivery. Calculation rules: For weights up to grams (inclusive), the base fee is yuan. For the portion exceeding grams, an additional fee of yuan is charged for every grams, with any portion less than grams being counted as grams. If the user chooses express delivery, an additional yuan is charged.
Input Format
Input consists of a single line containing an integer and a character, separated by a space, representing the weight (in grams) and whether express delivery is chosen. If the character is , it means express delivery is chosen; if the character is , it means express delivery is not chosen.
Output Format
Output a single line containing an integer, representing the postage.
Sample
1200 y17