Interval Open on JetBrains Academy

There is an integer as input. Output True if its value is within the interval (−15,12]∪(14,17)∪[19,+∞), otherwise print False (case sensitive).

Please note the different brackets, which are used to specify intervals. The problem uses semi-open and open intervals. You can read more about them in the Wikipedia.


Sample Input:
20
Sample Output:
True

Sample Input:
-20
Sample Output:
False


Memory limit: 256 MB
Time limit: 5 seconds

Show topic summary