count distance

lqdoj
 avatar
tocdovodoi
plain_text
2 months ago
204 B
2
Indexable
Never
n = int(input())
ds = list(map(int,input().split()))
d = max(ds)-min(ds)
for i in ds:
    if i>d:
        print("-"+str(i-d))
    if i<d:
        print("+"+str(d-i))
    if i==d:
        print(0)
Leave a Comment