#126. 判断模20余1或2

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

判断模20余1或2

Multiple of 20 Plus 1 or 2

Background

Congcong has recently been studying the properties of numbers. He found that some numbers exhibit interesting patterns in their remainders when divided by a specific number. Now, he wants your help to determine if a given number follows one of his special patterns.

Problem Description

Given a non-negative integer, return true if it is 11 or 22 more than a multiple of 2020. Otherwise, return false.

Input Format

Input is given from standard input in the following format.

A non-negative integer nn.

Output Format

Output is printed to standard output in the following format.

Output true if the condition is met; otherwise, output false.

Sample

20
false
21
true
22
true

Sample Explanation

For sample 11, 20(mod20)=020 \pmod{20} = 0, which is not 11 or 22, so it returns false. For sample 22, 21(mod20)=121 \pmod{20} = 1, which is 11, so it returns true. For sample 33, 22(mod20)=222 \pmod{20} = 2, which is 22, so it returns true.

Constraints

Time limit: 1 second per test case. Memory limit: 1024 KiB per test case.