111462024-07-07 16:32:54probaKártya (80 pont)python3Runtime error 0/8018ms3192 KiB
N = int(input())
lap = [int(i) for i in input().split(' ')]
slap = sum(lap)
tort = slap/N
egesz = slap//N

verdict = (tort == egesz )*'IGEN'+(tort != egesz)*'NEM'
print(verdict)

if verdict == 'IGEN':
    ajandek = [int(i-tort) for i in lap if i>tort 0]
    print(' '.join([str(i) for i in ajandek]))
    
else:
    print((egesz+1)*N-slap)
SubtaskSumTestVerdictTimeMemory
base0/80
1Runtime error0/017ms3092 KiB
2Runtime error0/018ms3044 KiB
3Runtime error0/417ms3088 KiB
4Runtime error0/517ms3100 KiB
5Runtime error0/517ms3044 KiB
6Runtime error0/517ms3044 KiB
7Runtime error0/517ms3064 KiB
8Runtime error0/417ms3068 KiB
9Runtime error0/417ms3044 KiB
10Runtime error0/517ms2936 KiB
11Runtime error0/517ms3092 KiB
12Runtime error0/517ms3172 KiB
13Runtime error0/617ms3192 KiB
14Runtime error0/618ms3108 KiB
15Runtime error0/717ms2916 KiB
16Runtime error0/717ms3044 KiB
17Runtime error0/717ms3064 KiB