109832024-04-26 00:12:1642Kártya (80 pont)python3Accepted 80/8018ms13612 KiB
from sys import stdin
input=stdin.readline

def main():
    N=int(input())
    A=list(map(int,input().split()))
    s=sum(A)
    if s%N==0:
        print('IGEN')
        x=s//N
        for a in A:
            if a>x:
                print(a-x,end=' ')
            else:
                print(0,end=' ')
        print()
    else:
        print('NEM')
        print(N-s%N)
    return

main()
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/017ms11364 KiB
2Accepted0/017ms11724 KiB
3Accepted4/417ms11988 KiB
4Accepted5/517ms11956 KiB
5Accepted5/517ms12252 KiB
6Accepted5/517ms12380 KiB
7Accepted5/517ms12496 KiB
8Accepted4/417ms12412 KiB
9Accepted4/417ms12544 KiB
10Accepted5/517ms12668 KiB
11Accepted5/517ms12920 KiB
12Accepted5/517ms12792 KiB
13Accepted6/618ms13228 KiB
14Accepted6/617ms13064 KiB
15Accepted7/718ms13500 KiB
16Accepted7/717ms13324 KiB
17Accepted7/717ms13612 KiB