111442024-07-07 16:10:47probaKártya (80 pont)python3Runtime error 0/8018ms3080 KiB
N = int(input())
lap = [int(i) for i in input().split(' ')]
laps = sum(lap)

verdict = (laps/N==laps//N )*'IGEN'+(laps/N!=laps//N )*'NEM'
print(verdict)

if verdict == 'IGEN':
    ajandek = []
    for i in lap:
        ajandek += [int(i-laps/N)] if i>laps/N else ajandek += [0]

    print(' '.join([str(i) for i in ajandek]))
else:
    print(((laps//N)+1)*N-laps)
SubtaskSumTestVerdictTimeMemory
base0/80
1Runtime error0/018ms3044 KiB
2Runtime error0/017ms3080 KiB
3Runtime error0/418ms3048 KiB
4Runtime error0/518ms3044 KiB
5Runtime error0/517ms3044 KiB
6Runtime error0/517ms2920 KiB
7Runtime error0/517ms3064 KiB
8Runtime error0/417ms3044 KiB
9Runtime error0/417ms2940 KiB
10Runtime error0/518ms2864 KiB
11Runtime error0/518ms3064 KiB
12Runtime error0/517ms2876 KiB
13Runtime error0/617ms2916 KiB
14Runtime error0/617ms2972 KiB
15Runtime error0/717ms3044 KiB
16Runtime error0/717ms3044 KiB
17Runtime error0/717ms3064 KiB