Untitled
Anonymous
plain_text
08/08/2024 8:21 AM
396 B
26
Indexable
#include <iostream>
using namespace std;
int n, k;
int a[100005];
int tong = 0;
int main()
{
cin >> n >> k;
for (int i = 1; i <= n; i++){
cin >> a[i];
tong += a[i];
}
if(tong % k == 0 && n % k == 0) cout << "YES";
else cout << "NO";
}
Editor is loading...
Leave a Comment