37172023-03-02 13:39:15KevinKövek (100 pont)cpp17Wrong answer 5/10026ms4416 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==1&&osszeg%n==0){
            osszeg=0;
            megoldas--;
        }
    }
    cout << megoldas;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/100
1Wrong answer0/03ms2088 KiB
2Wrong answer0/026ms3016 KiB
3Accepted5/52ms2368 KiB
4Wrong answer0/53ms2516 KiB
5Wrong answer0/52ms2692 KiB
6Wrong answer0/53ms2828 KiB
7Wrong answer0/52ms2908 KiB
8Wrong answer0/52ms3160 KiB
9Wrong answer0/72ms3332 KiB
10Wrong answer0/72ms3532 KiB
11Wrong answer0/82ms3656 KiB
12Wrong answer0/83ms3776 KiB
13Wrong answer0/83ms3760 KiB
14Wrong answer0/84ms3748 KiB
15Wrong answer0/810ms3972 KiB
16Wrong answer0/823ms4024 KiB
17Wrong answer0/826ms4416 KiB