111482024-07-07 16:36:56probaKártya (80 pont)python3Runtime error 0/8018ms3192 KiB
N = int(input())
lap = [int(i) for i in input().split(' ')]

slap = sum(lap)
tort, egesz = slap/N, slap//N

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

if verdict == 'IGEN':
    print(' '.join([str(i-tort) for i in lap if i>tort else '0']))
    
else:
    print((egesz+1)*N-slap)
SubtaskSumTestVerdictTimeMemory
base0/80
1Runtime error0/018ms3000 KiB
2Runtime error0/018ms2980 KiB
3Runtime error0/417ms3044 KiB
4Runtime error0/517ms3108 KiB
5Runtime error0/518ms3044 KiB
6Runtime error0/517ms3048 KiB
7Runtime error0/517ms3064 KiB
8Runtime error0/417ms3044 KiB
9Runtime error0/417ms3192 KiB
10Runtime error0/517ms3044 KiB
11Runtime error0/517ms3064 KiB
12Runtime error0/517ms3172 KiB
13Runtime error0/617ms3052 KiB
14Runtime error0/618ms3044 KiB
15Runtime error0/718ms3044 KiB
16Runtime error0/717ms2952 KiB
17Runtime error0/718ms3172 KiB