111432024-07-07 16:08:01probaKártya (80 pont)python3Runtime error 37/8018ms3192 KiB
N = int(input())

lap = [int(i) for i in input().split(' ')]
lap2 = sum(lap)
tort = lap2/N
egesz = lap2//N
verdict = (tort==egesz)*'IGEN'+(tort!=egesz)*'NEM'
print(verdict)
if verdict == 'IGEN':
    ajandek = []
    for i in lap:
        ajandek += [int(i-lap/N)] if i>lap/N else [0]

    print(' '.join([str(i) for i in ajandek]))
else:
    print((egesz+1)*N-lap2)
SubtaskSumTestVerdictTimeMemory
base37/80
1Runtime error0/017ms2980 KiB
2Accepted0/018ms3044 KiB
3Runtime error0/417ms2960 KiB
4Accepted5/517ms2960 KiB
5Runtime error0/517ms2960 KiB
6Accepted5/517ms3064 KiB
7Runtime error0/517ms2916 KiB
8Accepted4/417ms2864 KiB
9Runtime error0/417ms3064 KiB
10Accepted5/517ms2916 KiB
11Runtime error0/517ms3048 KiB
12Accepted5/517ms3044 KiB
13Runtime error0/617ms3064 KiB
14Accepted6/617ms3044 KiB
15Runtime error0/718ms3192 KiB
16Accepted7/717ms2936 KiB
17Runtime error0/717ms3100 KiB