# | Problem | Pass Rate (passed user / total user) |
---|---|---|
14286 | Check, please |
|
14287 | Escape the spider web |
|
Description
Create a program that calculates the total cost of an order in a restaurant based on the prices of items.
In a restaurant, the prices of items are as follows:
- "Steak": 500 NT dollars each
- "Pasta": 300 NT dollars each
- "Salad": 200 NT dollars each
Input
The first line contains an integer n (1 <= n <= 100), the number of items in the order.
The following n lines each contain a string s, representing an item in the order.
Output
A single line indicates the total cost of the order in NT dollars.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
You are a traveler journeying around the world. One day, you enter a forest and accidentally get stuck in a giant spider web. In order for the spider to spare you, it demands that you count the layers of its web. However, the spider only has 8 legs, so it can't count to 8. For example, while humans can count 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, spiders can only count 1, 2, 3, 4, 5, 6, 7, 10, 11, 12. Therefore, to escape the spider web, you must count the layers of the web and then convert the number into a form the spider can understand.
Input
Multiple lines of input, each line represents the layer of the spider web in humans' counting way.
Output
Print the number in spiders' format line by line.