Correct answer will be upvoted else downvoted. Computer science.    Polycarp recalled the 2020-th year, and he is content with the appearance of the new 2021-th year. To recall such a great second, Polycarp needs to address the number n as the amount of a specific number of 2020 and a specific number of 2021.    For instance, if:    n=4041, then, at that point, the number n can be addressed as the total 2020+2021;    n=4042, then, at that point, the number n can be addressed as the total 2021+2021;    n=8081, then, at that point, the number n can be addressed as the total 2020+2020+2020+2021;    n=8079, then, at that point, the number n can't be addressed as the amount of the numbers 2020 and 2021.    Assist Polycarp with seeing if the number n can be addressed as the amount of a specific number of numbers 2020 and a specific number of numbers 2021.    Input    The primary line contains one integer t (1≤t≤104) — the number of experiments. Then, at that point, t experiments follow.    Each experiment contains one integer n (1≤n≤106) — the number that Polycarp needs to address as the amount of the numbers 2020 and 2021.    Output    For each experiment, output on a different line:    "Indeed" if the number n is representable as the amount of a specific number of 2020 and a specific number of 2021;    "NO" in any case.    You can output "YES" and "NO" regardless (for instance, the strings yEs, indeed, Yes and YES will be perceived as sure).

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Correct answer will be upvoted else downvoted. Computer science.

 

 Polycarp recalled the 2020-th year, and he is content with the appearance of the new 2021-th year. To recall such a great second, Polycarp needs to address the number n as the amount of a specific number of 2020 and a specific number of 2021. 

 

For instance, if: 

 

n=4041, then, at that point, the number n can be addressed as the total 2020+2021; 

 

n=4042, then, at that point, the number n can be addressed as the total 2021+2021; 

 

n=8081, then, at that point, the number n can be addressed as the total 2020+2020+2020+2021; 

 

n=8079, then, at that point, the number n can't be addressed as the amount of the numbers 2020 and 2021. 

 

Assist Polycarp with seeing if the number n can be addressed as the amount of a specific number of numbers 2020 and a specific number of numbers 2021. 

 

Input 

 

The primary line contains one integer t (1≤t≤104) — the number of experiments. Then, at that point, t experiments follow. 

 

Each experiment contains one integer n (1≤n≤106) — the number that Polycarp needs to address as the amount of the numbers 2020 and 2021. 

 

Output 

 

For each experiment, output on a different line: 

 

"Indeed" if the number n is representable as the amount of a specific number of 2020 and a specific number of 2021; 

 

"NO" in any case. 

 

You can output "YES" and "NO" regardless (for instance, the strings yEs, indeed, Yes and YES will be perceived as sure).

 

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY