+ Нов въпрос
stoian_delev 3 Точки

## Theatre Promotions

1. Theatre Promotions

A theatre is doing a ticket sale, but they need a program to calculate the price of a single ticket. If the given age does not fit one of the categories, you should print "Error!".  You can see the prices in the table below:

 Day / Age 0 <= age <= 18 18 < age <= 64 64 < age <= 122 Weekday 12\$ 18\$ 12\$ Weekend 15\$ 20\$ 15\$ Holiday 5\$ 12\$ 10\$

Input

The input comes in two lines. On the first line, you will receive the type of day. On the second – the age of the person.

Output

Print the price of the ticket according to the table, or "Error!" if the age is not in the table.

Constraints

• The age will be in the interval [-1000…1000].
• The type of day will always be valid.

Examples

 Input Output Input Output Input Output Input Output Weekday 42 18\$ Holiday -12 Error! Holiday 15 5\$ Weekend 122 15\$

Здравейте дава ми 90/100 , не мога да си открия грешката:

https://pastebin.com/xJr5XrW2

0
peter.trifonoff 116 Точки