Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll; typedef unsigned long long llu ;
- void Code_Forces(){
- std::ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt","r",stdin) , freopen("output.txt","w",stdout) ;
- #endif
- }
- int main(){
- Code_Forces() ;
- ll n , k;
- cin >> n >> k;
- llu sum = 0 ;
- for(ll i = 0 ,entry ; i < n && cin >> entry; i++) sum += entry % k, sum %= k;
- cout << (sum % k ? "NO" : "YES") ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement