Untitled
unknown
plain_text
a month ago
296 B
4
Indexable
Never
#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"; }
Leave a Comment