#79. 极端温度判断

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

极端温度判断

Temperature Check

Background

Congcong is conducting a scientific experiment. He needs to determine if two given temperatures are in an extreme state. An extreme state is defined as one temperature being below freezing point (00 degrees Celsius) and the other being above boiling point (100100 degrees Celsius).

Problem Description

Given two temperature values, return true if one temperature is less than 00 and the other is greater than 100100, otherwise return false.

Input Format

Input is given from Standard Input in the following format.

temp1 temp2

Output Format

Output to Standard Output in the following format.

result

Sample

120 -1
true
-1 120
true
2 120
false

Sample Explanation

  • Sample 1: 120>100120 > 100 and 1<0-1 < 0. Both conditions are met, so output true.
  • Sample 2: 1<0-1 < 0 and 120>100120 > 100. Both conditions are met, so output true.
  • Sample 3: 22 is not less than 00, although 120120 is greater than 100100. Since 22 does not satisfy the condition of being less than 00, the extreme state definition is not met, so output false.

Constraints

For all test cases:

  • 109temp1,temp2109-10^9 \le \text{temp1}, \text{temp2} \le 10^9
  • Time Limit: 1s
  • Memory Limit: 1024KiB