172022025-06-03 12:37:40algoproKártya (80 pont)pypy3Accepted 80/8057ms21460 KiB
# UUID: 0261b676-9eba-4b46-a0f3-c7a77e03c0d2
N=int(input())
A=[int(x) for x in input().split()]
s=sum(A)
if s%N==0:
    print("IGEN")
    x=s//N
    B=[]
    for a in A:
        if a>x:
            B.append(a-x)
        else:
            B.append(0) 
    print(*B)
else:
    print("NEM")
    print(N-s%N)
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/039ms19436 KiB
2Accepted0/045ms19564 KiB
3Accepted4/443ms19368 KiB
4Accepted5/539ms19456 KiB
5Accepted5/541ms19472 KiB
6Accepted5/539ms19348 KiB
7Accepted5/545ms19472 KiB
8Accepted4/443ms19404 KiB
9Accepted4/441ms19576 KiB
10Accepted5/546ms19604 KiB
11Accepted5/541ms19692 KiB
12Accepted5/546ms19564 KiB
13Accepted6/657ms21260 KiB
14Accepted6/645ms19828 KiB
15Accepted7/750ms21400 KiB
16Accepted7/739ms19440 KiB
17Accepted7/756ms21460 KiB