25342023-01-16 18:27:59szabosamuelKártya (80 pont)cpp11Wrong answer 5/803ms3892 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++)
        {
            if(i<n) cout << k[i] << " ";
            else cout << k[i];
        }
    }
    else
    {
        int kell=sum%n;
        kell=n-kell;
        cout << kell;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/80
1Wrong answer0/03ms1876 KiB
2Wrong answer0/02ms2072 KiB
3Wrong answer0/42ms2548 KiB
4Accepted5/52ms2492 KiB
5Wrong answer0/52ms2688 KiB
6Wrong answer0/52ms2892 KiB
7Wrong answer0/52ms3028 KiB
8Wrong answer0/42ms3228 KiB
9Wrong answer0/42ms3432 KiB
10Wrong answer0/52ms3656 KiB
11Wrong answer0/52ms3572 KiB
12Wrong answer0/52ms3568 KiB
13Wrong answer0/62ms3572 KiB
14Wrong answer0/62ms3572 KiB
15Wrong answer0/72ms3816 KiB
16Wrong answer0/72ms3888 KiB
17Wrong answer0/72ms3892 KiB