#116. 雪茄数量与周末派对成功判断

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

雪茄数量与周末派对成功判断

Successful Party Check

Background

Small animals love to host parties.

Problem Description

When squirrels get together for a party, they like to have cigars. A squirrel party is successful when the number of cigars is between 4040 and 6060, inclusive. Unless it is the weekend, in which case there is no upper bound on the number of cigars. Return true if the party with the given values is successful, or false otherwise.

Input Format

Input is given from standard input in the following format.

NN (number of cigars) WW (is it the weekend, true or false)

Output Format

Output is printed to standard output in the following format.

Output true if the party is successful; otherwise, output false.

Sample

30 false
false
50 false
true
70 true
true

Sample Explanation

Sample 1: The number of cigars 3030 is not between 4040 and 6060, and it's not the weekend, so the party is not successful. Sample 2: The number of cigars 5050 is between 4040 and 6060, and it's not the weekend, so the party is successful. Sample 3: The number of cigars 7070 is not between 4040 and 6060, but it is the weekend, so there is no upper bound, and the party is successful.

Constraints

NN is a non-negative integer. WW is a boolean value.