Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int t;
- scanf("%d", &t);
- while(t--)
- {
- int n;
- scanf("%d", &n);
- if(n < 2020)
- {
- printf("NO\n");
- }
- else if(n == 2021 || n == 2020) printf("YES\n");
- else
- {
- int f = 0;
- while(n >= 2020)
- {
- if(n % 2020 == 0 || n % 2021 == 0)
- {
- f = 1;
- printf("YES\n");
- break;
- }
- n -= 2021;
- }
- if(f == 0) printf("NO\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement