28802023-02-01 14:27:18KristófKártya (80 pont)cpp11Wrong answer 53/803ms3732 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >>n;
    int sum=0;
    int atlag;
    int k[n];
    for(int i=0;i<n;i++){
        cin>>k[i];
        sum=sum+k[i];
    }
    atlag=sum/n;
    if(sum%n==0){
        cout<<"IGEN"<<endl;
    }
    else{

        cout<<"NEM"<<endl<<sum%n;
        return 0;
    }

    for(int i=0;i<n;i++){
        if(k[i]-atlag>0){
            cout<<k[i]-atlag<<" ";
        }
        else
            cout<<0<<" ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base53/80
1Accepted0/03ms1876 KiB
2Wrong answer0/03ms2068 KiB
3Accepted4/43ms2276 KiB
4Accepted5/52ms2364 KiB
5Accepted5/52ms2364 KiB
6Accepted5/53ms2500 KiB
7Accepted5/52ms2572 KiB
8Wrong answer0/42ms2704 KiB
9Accepted4/43ms2784 KiB
10Wrong answer0/53ms3036 KiB
11Accepted5/53ms3284 KiB
12Wrong answer0/53ms3388 KiB
13Accepted6/63ms3584 KiB
14Wrong answer0/63ms3664 KiB
15Accepted7/73ms3656 KiB
16Wrong answer0/73ms3648 KiB
17Accepted7/73ms3732 KiB