#119. 超速罚单等级判定
超速罚单等级判定
Speeding Ticket
Background
You are driving a little too fast, and a police officer stops you.
Problem Description
Write code to compute the result, encoded as an integer value: = no ticket, = small ticket, = big ticket. If speed is or less, the result is . If speed is between and inclusive, the result is . If speed is or more, the result is . Unless it is your birthday -- on that day, your speed can be higher in all cases.
Input Format
Input is given from Standard Input in the following format.
speedis_birthday
Where speed is an integer representing your car's speed, and is_birthday is a boolean value (true or false) indicating if it's your birthday.
Output Format
Output is printed to Standard Output in the following format.
ticket_level
Where ticket_level is an integer representing the ticket level (, , or ).
Sample
60 false
0
65 false
1
65 true
0
Sample Explanation
Sample 1: Speed is , not birthday. , so no ticket, result is . Sample 2: Speed is , not birthday. , so small ticket, result is . Sample 3: Speed is , is birthday. On birthday, speed limits are increased by . So , no ticket, result is .
Constraints
is_birthdayistrueorfalse.