111492024-07-07 16:58:17probaKártya (80 pont)python3Accepted 80/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(int(i-tort)) if i>tort else '0' for i in lap]))
    
else:
    print((egesz+1)*N-slap)
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/018ms2916 KiB
2Accepted0/018ms3044 KiB
3Accepted4/417ms2916 KiB
4Accepted5/518ms3080 KiB
5Accepted5/517ms2960 KiB
6Accepted5/517ms3064 KiB
7Accepted5/517ms2916 KiB
8Accepted4/417ms2916 KiB
9Accepted4/417ms2908 KiB
10Accepted5/517ms3012 KiB
11Accepted5/517ms2916 KiB
12Accepted5/517ms3192 KiB
13Accepted6/617ms3044 KiB
14Accepted6/618ms3088 KiB
15Accepted7/717ms2916 KiB
16Accepted7/717ms3044 KiB
17Accepted7/717ms2976 KiB