37162023-03-02 13:37:45KevinKövek (100 pont)cpp17Wrong answer 0/10027ms4644 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int atlag=0;
    int osszeg=0;
    cin >> n;
    int megoldas=n;
    vector<int> vec(n);
    for (int i=0; i<n; i++){
        cin >> vec[i];
        atlag=atlag+vec[i];
    }
    atlag=atlag/n;
    for (int i=0; i<n; i++){
        osszeg=osszeg+vec[i];
        if(osszeg/n==0){
            osszeg=0;
            megoldas--;
        }
    }
    cout << megoldas;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/100
1Wrong answer0/03ms1808 KiB
2Wrong answer0/027ms2764 KiB
3Wrong answer0/53ms2416 KiB
4Wrong answer0/52ms2344 KiB
5Wrong answer0/53ms2432 KiB
6Wrong answer0/53ms2792 KiB
7Wrong answer0/52ms2864 KiB
8Wrong answer0/52ms3076 KiB
9Wrong answer0/73ms3316 KiB
10Wrong answer0/73ms3448 KiB
11Wrong answer0/82ms3392 KiB
12Wrong answer0/83ms3528 KiB
13Wrong answer0/83ms4056 KiB
14Wrong answer0/84ms4032 KiB
15Wrong answer0/810ms4176 KiB
16Wrong answer0/824ms4372 KiB
17Wrong answer0/827ms4644 KiB