count distance

lqdoj
 avatar
tocdovodoi
plain_text
a year ago
204 B
5
Indexable
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)
Editor is loading...
Leave a Comment