30272023-02-08 17:44:51xxxKövek (100 pont)cpp11Accepted 100/10027ms5204 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	int sums[n], sum = 0;
    int k;
	for(int i = 0; i<n; i++){
		cin>>k;
		sum += k;
		sums[i] = sum;
	}
	int atlag = sum / n;
	int ans = 0;
	for(int i = 1; i <= n; i++){
		if(sums[i-1] != (atlag * i)){
			ans++;
		}
	}
	cout << ans;
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base100/100
1Accepted0/03ms2152 KiB
2Accepted0/027ms3072 KiB
3Accepted5/53ms2508 KiB
4Accepted5/53ms2728 KiB
5Accepted5/53ms3088 KiB
6Accepted5/53ms3180 KiB
7Accepted5/53ms3228 KiB
8Accepted5/53ms3308 KiB
9Accepted7/73ms3440 KiB
10Accepted7/73ms3644 KiB
11Accepted8/83ms3708 KiB
12Accepted8/83ms3924 KiB
13Accepted8/83ms3992 KiB
14Accepted8/84ms4016 KiB
15Accepted8/810ms4388 KiB
16Accepted8/824ms5056 KiB
17Accepted8/827ms5204 KiB