Evi has N integers a_1,a_2,..,a_N. His objective is to have N equal **integers** by transforming some of them.  He may transform each integer at most once. Transforming an integer x into another integer y costs him (x-y)^2 dollars. Even if a_i=a_j (i≠j), he has to pay the cost separately for transforming each of them (See Sample 2).  Find the minimum total cost to achieve his objective.
import numpy as np
n=int(input())
a=np.array([int(x) for x in input().split()])
x=[]
for i in a:
	s=sum((a-i)*(a-i))
	x.append(s)
print(min(x))
import numpy as np
n=int(input())
a=np.array([int(x) for x in input().split()])
x=[]
for i in range(-100,101):
	s=np.sum((a-i)*(a-i))
	x.append(s)
print(min(x))