111412024-07-07 16:03:10probaKártya (80 pont)python3Runtime error 0/8018ms3192 KiB
N = int(input())

lap = [int(i) for i in input().split(' ')]

verdict = (sum(lap)/N==sum(lap)//N )*'IGEN'+( sum(lap)/N!=sum(lap)//N )*'NEM'
print(verdict)
if verdict == 'IGEN':
    ajandek = []
    for i in lap:
        ajandek += [int(i-sum(lap)/N)] if i>sum(lap)/N else ajandek += [0]

    print(' '.join([str(i) for i in ajandek]))
else:
    print(((sum(lap)//N)+1)*N-sum(lap))
SubtaskSumTestVerdictTimeMemory
base0/80
1Runtime error0/017ms3088 KiB
2Runtime error0/017ms3156 KiB
3Runtime error0/417ms2980 KiB
4Runtime error0/518ms3044 KiB
5Runtime error0/517ms2996 KiB
6Runtime error0/517ms3044 KiB
7Runtime error0/517ms3048 KiB
8Runtime error0/417ms2916 KiB
9Runtime error0/417ms2972 KiB
10Runtime error0/517ms3044 KiB
11Runtime error0/517ms3112 KiB
12Runtime error0/517ms3044 KiB
13Runtime error0/617ms2972 KiB
14Runtime error0/618ms2892 KiB
15Runtime error0/717ms3044 KiB
16Runtime error0/717ms3192 KiB
17Runtime error0/717ms2916 KiB