111472024-07-07 16:33:54probaKártya (80 pont)python3Runtime error 0/8017ms3192 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 else 0]
    print(' '.join([str(i) for i in ajandek]))
    
else:
    print((egesz+1)*N-slap)
SubtaskSumTestVerdictTimeMemory
base0/80
1Runtime error0/017ms3088 KiB
2Runtime error0/017ms3044 KiB
3Runtime error0/417ms3044 KiB
4Runtime error0/517ms3044 KiB
5Runtime error0/517ms2952 KiB
6Runtime error0/517ms3044 KiB
7Runtime error0/517ms3192 KiB
8Runtime error0/417ms3044 KiB
9Runtime error0/417ms2916 KiB
10Runtime error0/517ms3088 KiB
11Runtime error0/517ms2972 KiB
12Runtime error0/517ms2972 KiB
13Runtime error0/617ms3100 KiB
14Runtime error0/617ms3044 KiB
15Runtime error0/717ms2992 KiB
16Runtime error0/717ms3192 KiB
17Runtime error0/717ms2992 KiB