Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
465 B
5
Indexable
Never
#include <bits/stdc++.h>
using namespace std;
#define endl '\n';
typedef long long ll;
typedef string::size_type sz;


int main()
{
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--)
  {
    int n;
    cin >> n;
    while (n >= 2020 || n >= 2021)
    {
      if ((n % 10) != 0)
        n -= 2021;
      else
        n -= 2020;
    }
    cout << ((n == 0) ? "YES" : "NO") << endl;
  }
  return EXIT_SUCCESS;
}
Leave a Comment