Advertisement
7oSkaaa

Player and Sum

Aug 18th, 2021
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. typedef long long ll;   typedef unsigned long long llu ;
  5. void Code_Forces(){
  6.     std::ios_base::sync_with_stdio(false);  cin.tie(nullptr);  cout.tie(nullptr);
  7. #ifndef ONLINE_JUDGE
  8.     freopen("input.txt","r",stdin) , freopen("output.txt","w",stdout) ;
  9. #endif
  10. }
  11. int main(){
  12.     Code_Forces() ;
  13.     ll n , k;
  14.     cin >> n >> k;
  15.     llu sum = 0 ;
  16.     for(ll i = 0 ,entry ; i < n && cin >> entry; i++) sum += entry % k, sum %= k;
  17.     cout << (sum % k ? "NO" : "YES") ;
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement