37112023-03-02 13:20:59KevinKövek (100 pont)cpp17Wrong answer 15/10027ms4780 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int atlag=0;
    int osszeg=0;
    int megoldas=0;
    cin >> 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];
        megoldas++;
        if(osszeg%n==0){
            osszeg=0;
            megoldas--;
        }
    }
    cout << megoldas;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base15/100
1Accepted0/03ms1816 KiB
2Wrong answer0/027ms2764 KiB
3Accepted5/52ms2240 KiB
4Wrong answer0/52ms2444 KiB
5Accepted5/53ms2656 KiB
6Accepted5/53ms2868 KiB
7Wrong answer0/52ms3080 KiB
8Wrong answer0/52ms3320 KiB
9Wrong answer0/72ms3376 KiB
10Wrong answer0/73ms3500 KiB
11Wrong answer0/82ms3592 KiB
12Wrong answer0/83ms3716 KiB
13Wrong answer0/83ms3844 KiB
14Wrong answer0/84ms3868 KiB
15Wrong answer0/810ms4092 KiB
16Wrong answer0/824ms4464 KiB
17Wrong answer0/827ms4780 KiB