#128. 判断数字是否接近20的倍数
判断数字是否接近20的倍数
Judge if Close to a Multiple of 20
Background
Congcong is learning about number properties. He wants to write a program to determine if a given non-negative number satisfies a special condition.
Problem Description
Given a non-negative integer , return true if is 1 or 2 less than a multiple of 20; otherwise, return false.
For example:
- For , it is 2 less than , so return
true. - For , it is 1 less than , so return
true. - For , it is exactly a multiple of 20, which does not satisfy the condition, so return
false.
Input Format
Input a non-negative integer .
Output Format
Output true if the condition is met, otherwise output false.
trueorfalse
Sample
18
true
19
true
20
false
Sample Explanation
- For , it is 2 less than , so return
true. - For , it is 1 less than , so return
true. - For , it is exactly a multiple of 20, which does not satisfy the condition, so return
false.
Constraints
Time limit: 1 second per test case. Memory limit: 1024 KiB per test case. is a non-negative integer.