25332023-01-16 18:22:18szabosamuelKártya (80 pont)cpp11Wrong answer 11/803ms3480 KiB
#include <iostream>
using namespace std;

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

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base11/80
1Wrong answer0/03ms1884 KiB
2Wrong answer0/02ms2268 KiB
3Wrong answer0/42ms2400 KiB
4Wrong answer0/52ms2604 KiB
5Wrong answer0/52ms2804 KiB
6Accepted5/52ms2820 KiB
7Wrong answer0/52ms2944 KiB
8Wrong answer0/42ms3068 KiB
9Wrong answer0/42ms3128 KiB
10Wrong answer0/52ms3108 KiB
11Wrong answer0/52ms3236 KiB
12Wrong answer0/52ms3232 KiB
13Wrong answer0/62ms3236 KiB
14Accepted6/62ms3356 KiB
15Wrong answer0/72ms3480 KiB
16Wrong answer0/72ms3436 KiB
17Wrong answer0/72ms3436 KiB