|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||0||0||0||0.000%|
Tehran municipality has set up a new charging method for the Congestion Charging Zone (CCZ) which controls the passage of vehicles in Tehran’s high-congestion areas in the congestion period (CP) from 6:30 to 19:00. There are plate detection cameras inside or at the entrances of the CCZ recording vehicles seen at the CCZ. The table below summarizes the new charging method.
|The first time seen in the CP||The last time seen in the CP||Charge|
|6:30 to 10:00||6:30 to 16:00||24000|
|6:30 to 10:00||16:01 to 19:00||36000|
|10:01 to 16:00||10:01 to 16:00||16800|
|10:01 to 19:00||16:01 to 19:00||24000|
Note that the first time and the last time that a vehicle is seen in the CP may be the same. Write a program to compute the amount of charge of a given vehicle in a specific day.
The first line of the input contains a positive integer n (1 ≤ n ≤ 100) where n is the number of records for a vehicle. Each of the next n lines contains a time at which the vehicle is seen. Each time is of form <hour>:<minute>, where <hour> is an integer number between 0 and 23 (inclusive) and <minute> is formatted as an exactly two-digit number between 00 and 59 (inclusive).
Print the charge to be paid by the owner of the vehicle in the output.
4 7:30 2:20 7:30 17:30
2 0:30 23:30