#263. 鹦鹉说话惹麻烦判断

    ID: 263 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-1gesp1条件结构

鹦鹉说话惹麻烦判断

Parrot Trouble

Background

Dawei has a loud talking parrot. This parrot is very noisy, especially at inappropriate times.

Problem Description

We have a loud talking parrot. The hour parameter is the current hour time in the range 0230 \dots 23. We are in trouble if the parrot is talking and the hour is before 77 or after 2020. Return true if we are in trouble.

Input Format

Input is given from standard input in the following format.

talking hour Where talking is a boolean value (true or false), indicating whether the parrot is talking. hour is an integer representing the current hour (0hour230 \le \text{hour} \le 23).

Output Format

Output is printed to standard output in the following format.

A boolean value, true if we are in trouble, false otherwise.

Sample

true 6
true
true 7
false
false 6
false

Sample Explanation

  • Sample 1: The parrot is talking (true), and the hour is 66. Since 6<76 < 7, we are in trouble, so return true.
  • Sample 2: The parrot is talking (true), and the hour is 77. Since 77 is not less than 77 and not greater than 2020, we are not in trouble, so return false.
  • Sample 3: The parrot is not talking (false), so regardless of the hour, we are not in trouble, so return false.

Constraints

  • The hour parameter is in the range 0230 \dots 23.