Problem:
 Score: 200 points    Problem Statement A country decides to build a palace.  In this country, the average temperature of a point at an elevation of x meters is T-x \times 0.006 degrees Celsius.  There are N places proposed for the place. The elevation of Place i is H_i meters.  Among them, Princess Joisino orders you to select the place whose average temperature is the closest to A degrees Celsius, and build the palace there.  Print the index of the place where the palace should be built.  It is guaranteed that the solution is unique.      Constraints  1 \leq N \leq 1000  0 \leq T \leq 50  -60 \leq A \leq T  0 \leq H_i \leq 10^5  All values in input are integers.  The solution is unique.         Input Input is given from Standard Input in the following format:  N  T  A  H_1  H_2  ...  H_N       Output Print the index of the place where the palace should be built.        Sample Input 1 2
12 5
1000 2000      Sample Output 1 1   The average temperature of Place 1 is 12-1000 \times 0.006=6 degrees Celsius.  The average temperature of Place 2 is 12-2000 \times 0.006=0 degrees Celsius.   Thus, the palace should be built at Place 1 .       Sample Input 2 3
21 -11
81234 94124 52141      Sample Output 2 3

Solution (Python):
N = int(input())
T, A = map(int, input().split())		
H = list( map(int, input().split()) )	




H = list(map(lambda x: abs(T-(0.006*x)-A), H) )	


ans = min(H)


i=0
for i in range(N):
	if(ans==H[i]):break

print(int(i+1))

Solution (Python):
n = int(input()) 
t,a = map(int,input().split())
x_li = list(map(int,input().split())) 

x_temp_li = []
x_a_li = []
for i in x_li:
    temp = t - i * 0.006
    x_temp_li.append(temp)
for i in x_temp_li:
    temp_a = i - a
    x_a_li.append(abs(temp_a))
print(x_a_li.index(min(x_a_li)) + 1)

Solution (Python):
import numpy as np
N = int(input())
T,A = map(int, input().split())
H =  list(map(int, input().split()))

temp = np.argsort([abs(A - (T-h*0.006)) for h in H])[0]
print(temp+1)

Solution (Python):
n=int(input())
s=input().split()
t=int(s[0])
a=int(s[1])
s=input().split()
best=100000000000000000
res=-1
for i in range(n):
    h=int(s[i])
    if best>abs(a-t+h*0.006):
        best=abs(a-t+h*0.006)
        res=i+1
print(res)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
res_diff=666
res_idx=0
for i,x in enumerate(map(int,input().split())):
  if(abs(a-t+0.006*x)<res_diff):
    res_diff=abs(a-t+0.006*x)
    res_idx=i+1
print(res_idx)

Solution (Python):
import sys

array = list(map(int, input().strip().split(' ')))

N = array[0]


if N < 1:
    sys.exit()
if N > 1000:
    sys.exit()





array1 = list(map(int, input().strip().split(' ')))

T = array1[0]
A = array1[1]


if T < 0:
    sys.exit()
if T > 50:
    sys.exit()

if A < -60:
    sys.exit()
if A > T:
    sys.exit()

array2 = list(map(int, input().strip().split(' ')))

kazu = len(array2)

if kazu != N:
    sys.exit()

saiteki = 0

saiteki = 10**5

for i in range(N):

    

    kensa = T - array2[i] * 0.006

    kensa1 = abs(A - kensa)

    if saiteki > kensa1:
        saiteki = kensa1
        saiteki_no = i


saiteki_no = saiteki_no + 1

print(saiteki_no)

Solution (Python):
N = int(input())
T, A = map(int, input().split())		
H = list( map(int, input().split()) )	




H = list(map(lambda x: abs(T-(0.006*x)-A), H) )	


ans = min(H)


i=0
for i in range(N):
	if(ans==H[i]):break

print(int(i+1))

Solution (Python):


n = map(int, raw_input().split())
t, a = map(int, raw_input().split())

h = raw_input().split()





hdiff = [0] * n[0]
for i in range(n[0]):
    hdiff[i] = abs(t - a - int(h[i]) * 0.006)



ans = hdiff.index(min(hdiff))
print ans + 1

Solution (Python):
N = int(input())
T, A = map(int, input().split())		
H = list( map(int, input().split()) )	




H = list(map(lambda x: abs(T-(0.006*x)-A), H) )	


ans = min(H)


i=0
for i in range(N):
	if(ans==H[i]):break

print(int(i+1))

Solution (Python):
n = int(input())
t, a = map(int,input().split())
li = list(map(int,input().split()))
n_temp = li[0]
answer = 0
for idx, temp in enumerate(li):
    i_temp = t - temp * 0.006
    if (abs(a - n_temp) >= abs(a -i_temp)):
        n_temp = i_temp
        answer = idx

print(answer+1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())		
H = list( map(int, input().split()) )	




H = list(map(lambda x: abs(T-(0.006*x)-A), H) )	


ans = min(H)


i=0
for i in range(N):
	if(ans==H[i]):break

print(int(i+1))

Solution (Python):
N = int(input())
T,A = list(map(int, input().split()))
H = list(map(int, input().split()))
ansx=T-H[0]*0.006
ans=1
for i in range(N):
    subans=T-H[i]*0.006
    if abs(A-subans)<abs(A-ansx):
        ansx=subans
        ans=i+1
print(ans)

Solution (Python):
N = int(input())
T, A = map(int, input().split())		
H = list( map(int, input().split()) )	




H = list(map(lambda x: abs(T-(0.006*x)-A), H) )	


ans = min(H)


i=0
for i in range(N):
	if(ans==H[i]):break

print(int(i+1))

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
b=[0,t-h[0]*0.006]
for (i,x) in enumerate(h):
	if abs((t-x*0.006)-a) < abs(b[1]-a):
		b=[i,(t-x*0.006)]
print(b[0]+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = map(int,input().split())
to = 100000000000
c = 1
for i in H:
    temp = T-i*0.006
    b = A-temp
    if b < 0:
        b = -b
    if to > b:
        to = b
        k = c
    c += 1
print(k)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
b=[0,t-h[0]*0.006]
for (i,x) in enumerate(h):
	if abs((t-x*0.006)-a) < abs(b[1]-a):
		b=[i,(t-x*0.006)]
print(b[0]+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = map(int,input().split())
to = 100000000000
c = 1
for i in H:
    temp = T-i*0.006
    b = A-temp
    if b < 0:
        b = -b
    if to > b:
        to = b
        k = c
    c += 1
print(k)

Solution (Python):
import numpy as np

N = input()
T, A = map(int, input().split())
H_list = []
H_list = list(map(int, input().split()))
T_list = list(map(lambda x : T - (x * 0.006), H_list))
T_list_2 = np.array(list(map(lambda x : abs(x - A), T_list)))
index = np.argmin(T_list_2)
print(index + 1)

Solution (Python):
N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))

risuto = []
for i in range(N):
    kion = T - H[i] * 0.006
    cnt = abs(A - kion)
    risuto.append(cnt)

print(risuto.index(min(risuto)) + 1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = map(int,input().split())
to = 100000000000
c = 1
for i in H:
    temp = T-i*0.006
    b = A-temp
    if b < 0:
        b = -b
    if to > b:
        to = b
        k = c
    c += 1
print(k)

Solution (Python):


n = map(int, raw_input().split())
t, a = map(int, raw_input().split())

h = raw_input().split()





hdiff = [0] * n[0]
for i in range(n[0]):
    hdiff[i] = abs(t - a - int(h[i]) * 0.006)



ans = hdiff.index(min(hdiff))
print ans + 1

Solution (Python):


n = map(int, raw_input().split())
t, a = map(int, raw_input().split())

h = raw_input().split()





hdiff = [0] * n[0]
for i in range(n[0]):
    hdiff[i] = abs(t - a - int(h[i]) * 0.006)



ans = hdiff.index(min(hdiff))
print ans + 1

Solution (Python):
N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))

risuto = []
for i in range(N):
    kion = T - H[i] * 0.006
    cnt = abs(A - kion)
    risuto.append(cnt)

print(risuto.index(min(risuto)) + 1)

Solution (Python):
N = int(input()) 
T, A = map(int,input().split())
H = list(map(int,input().split()))

num = H[0]
for i in range(N):
    H[i] = T - H[i]*0.006
    H[i] = abs(A - H[i])
    
    if H[i] < num:
        num = H[i]
        flag = i
print(flag+1)

Solution (Python):
t = int(input())
a,b = map(int, input().split())
ss = list(map(int, input().split()))
p = 0
mi= 99999999999999

for i in range(len(ss)):
    if mi > abs(b - (a - 0.006*ss[i])):
        p = i
        mi = abs(b - (a - 0.006*ss[i]))
print(p+1)

Solution (Python):
n = int(input())

t, a = input().strip().split(' ')
t, a = [int(t), int(a)]

h = map(int, input().split())
h = list(h)

min = 1000000
tmp = 1

def ave_tmp(x):
    return (t - x * 0.006)

def diff(ave_tmp):
    if (a - ave_tmp) > 0:
        return (a - ave_tmp)
    else:
        return (ave_tmp - a)

for i in range(len(h)):
    if diff(ave_tmp(h[i])) < min:
        min = diff(ave_tmp(h[i]))
        tmp = i + 1

print(tmp)

Solution (Python):
import math

def gcd(a,b):
    """Compute the greatest common divisor of a and b"""
    while b > 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b / gcd(a, b)


N = int(input().strip())
T,A = list(map(int, input().strip().split(' ')))

H = list(map(int, input().strip().split(' ')))

best_i = 0
best_temp = T-H[0]*0.006

for i in range(1,N):
	if(abs(A-best_temp) > abs(A-(T-H[i]*0.006))):
		best_i = i
		best_temp = T-H[i]*0.006

print(best_i+1)

Solution (Python):
N = int(input()) 
T, A = map(int,input().split())
H = list(map(int,input().split()))

num = H[0]
for i in range(N):
    H[i] = T - H[i]*0.006
    H[i] = abs(A - H[i])
    
    if H[i] < num:
        num = H[i]
        flag = i
print(flag+1)

Solution (Python):

n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))


min = 99999
ans = -1


for idx in range(n):
    if abs(a - (t - h[idx] * 0.006)) < min:
        min = abs(a - (t - h[idx] * 0.006))
        ans = idx + 1


print(int(ans))

Solution (Python):
N = int(input())
T,A = map(int, input().split())
h = map(float, input().split())
H = list(map(lambda x: abs(A - (T - (x * 0.006))), h))

ans = -1
tar = 999999999999
for i,v in enumerate(H):
    if tar > v:
        tar = v
        ans = i
print(ans + 1)

Solution (Python):


"""Describe
"""
import numpy as np

def temp(height, t): 
    return t - 0.006 * height
   
def temp_to_height(a, t):
    return (t - a) / 0.006

def main():
    n = int(input())
    t, a = map(int, input().split())
    goal_height = temp_to_height(a, t)

    heights = list(map(int, input().split()))
    
    


    best_index = -1
    best_diff = np.inf

    for i, h in enumerate(heights):
        diff = abs(h - goal_height)
        if diff < best_diff:
            best_diff = diff
            best_index = i
    best_number = best_index + 1

    print(best_number)
    
    

main()

Solution (Python):

import numpy as np

def mean_temp(t, x):
    temp = t - x * 0.006
    return temp

def getNearestIdx(list, num):
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

if __name__ == '__main__':
    n = int(raw_input())
    t, a = map(int, raw_input().split())
    hs = map(int, raw_input().split())

    result = []
    for h in hs:
        result.append(mean_temp(t, h))
    output = getNearestIdx(result, a) + 1
    print output

Solution (Python):
N=int(input())
T,A=map(float,input().split())
Areal=0.0
Areal=(T-A)//0.006
x=list(map(float,input().split()))
point=0
for i in range(N):
        if abs(x[point]-Areal) > abs(x[i]-Areal):
                point=i
print(point+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = [A -(T - int(x)*0.006) for x in input().split()]
h = [abs(i) for i in H]
print(h.index(min(h))+1)

Solution (Python):
def htemp(t, x):
    return float(t - 0.006 * x)
    
input()
lt, la = [int(x) for x in input().split()]
h_ary = [int(x) for x in input().split()]
    
maxdiff = float('inf')
goodpoint = 0
for i, h in enumerate(h_ary):
    diff = abs(la - htemp(lt, h))
    if diff < maxdiff:
        maxdiff = diff
        goodpoint = i
print(goodpoint+1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())

lists = list(map(int, input().split()))
ans = []

for i in lists:
    temp = t - i*0.006
    b = a - temp
    ans.append(abs(b))

answer = min(ans)
    
for i in range(len(lists)):
    temp = t-lists[i]*0.006
    b = abs(a-temp)
    if b == answer:
        print(i+1)
        break

Solution (Python):

import numpy as np

def mean_temp(t, x):
    temp = t - x * 0.006
    return temp

def getNearestIdx(list, num):
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

if __name__ == '__main__':
    n = int(raw_input())
    t, a = map(int, raw_input().split())
    hs = map(int, raw_input().split())

    result = []
    for h in hs:
        result.append(mean_temp(t, h))
    output = getNearestIdx(result, a) + 1
    print output

Solution (Python):
"""
入力フォーマット
N
T A
H_1 ... H_N

N:候補地点数
T:標準気温
A:所望の気温
H_i:地点iの高さ

高さxの地点の平均気温はT-x*0.06
"""

N = int(input())
line = input().rstrip().split(" ")
T = int(line[0])
A = int(line[1])
H = list(map(int, input().split(" ")))

min = 1000
min_i = 0
for i in range(N):
	if min > abs(A-(T-0.006*H[i])):
		min = abs(A-(T-0.006*H[i]))
		min_i = i+1


print(min_i)

Solution (Python):
import numpy as np
def getNearestValue(list, num):
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

_ = input()
T, A = [int(x) for x in input().split()]
H = [int(x) for x in input().split()]

anser = getNearestValue(H, (T-A)/0.006)
print(anser + 1)

Solution (Python):





"""
abc113 B
"""

n = int(input())
t, a = map(int, input().split())
hli = list(map(int, input().split()))

hli2 = map(lambda x: (x[0]+1, abs(t-x[1]*0.006-a)), enumerate(hli))
print(min(hli2, key=lambda x: x[1])[0])

Solution (Python):
N = int(input())
T,A = map(int,input().split())
heights = input().split()
heights = [int(x) for x in heights]
best_H = (T - A) / 0.006
diff_l, diff_h = 100000,100000
n_l,n_h = 0,N-1
for i in range(N):
    diff = abs(best_H - heights[i])
    if diff < diff_l:
        diff_l = diff
        n_l = i
print(n_l+1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())

h = list(map(int, input().split()))

idx = 0
tmp = 1000000000
for i, x in enumerate(h):
    ave_t = t - 0.006 * x
    if abs(a - ave_t) < abs(a - tmp):
        idx = i
        tmp = ave_t
print(idx + 1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
temp = list(map(int,input().split()))
tmp = 10**9
index= 1

for i in temp:
  if abs(a- (tmp)) > abs(a- (t - i * 0.006)):
    tmp = t - i * 0.006
    index = temp.index(i)+1


print(index)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
mini=100000000
ans=0
for i in range(n):
    if abs(t-h[i]*0.006-a)<mini:
        mini=abs(t-h[i]*0.006-a)
        ans=i
print(ans+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
_min = 0
for i in range(N):
	
	if abs(A - (T - H[_min]*0.006))   >= abs(A - (T - H[i]*0.006)):

		_min = i
	
print(_min+1)

Solution (Python):
N = int(input())
T, A = [int(s) for s in input().rstrip().split()]
H = [int(s) for s in input().rstrip().split()]

temp = [T - x * 0.006 for x in H]
diff = [abs(A - temp[0])]
diff_min = diff[0]
ans = 0
for n in range(1, N):
    new_diff = abs(A - temp[n])
    if new_diff < diff_min:
        ans = n
        diff_min = new_diff
    diff.append(new_diff)

print(ans + 1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
High=[int(x) for x in input().split()]
D=[]
for i in range(N):
	D.append(T-int(High[i])*0.006-A)
	if D[i]<=0:
		D[i]=-D[i]
	
for i in range(N):
	if D[i]==min(D):
		print(i+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
_min = 0
for i in range(N):
	
	if abs(A - (T - H[_min]*0.006))   >= abs(A - (T - H[i]*0.006)):

		_min = i
	
print(_min+1)

Solution (Python):
n=int(input())
t,a=map(int, input().split())
h = [int(i) for i in input().split()]

ret = int(1e9)
index = 0
for i, v in enumerate(h):
    tmp = abs(a - t + v * 0.006)
    if tmp < ret:
        ret = tmp
        index = i

print(index+1)

Solution (Python):
def get_temp(t, x):
    return t - x * 0.006


def get_abs(x, y):
    return abs(x - y)


def main():
    n = int(input())
    t, a = [int(e) for e in input().split()]
    h = [int(e) for e in input().split()]
    

    ans_diff = None
    ans = 0

    for i, height in enumerate(h):
        temp = get_temp(t, height)
        diff = get_abs(a, temp)
        if (ans_diff is None) or diff < ans_diff:
            ans_diff = diff
            ans = i + 1

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
T, A = map(int, input().split())
h_list = list(map(int, input().split()))
d_list = [ abs(T-0.006*x-A) for x in h_list ]
ans_d = max(d_list)
for i,x in enumerate(d_list):
    if ans_d >= x:
        ans_d = x
        ans = i
print(ans+1)

Solution (Python):
n=int(input())
m=list(map(int,input().split()))
kouho=list(map(int,input().split()))
answer=1
ansc=abs(m[1]-(m[0]-kouho[0]*0.006))
for i in range(n):
    if abs(m[1]-(m[0]-kouho[i]*0.006))<ansc:
        ansc=abs(m[1]-(m[0]-kouho[i]*0.006))
        answer=i+1
print(answer)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
res=[0,abs(a-(t-(h[0]*0.006)))]
for i in range(1,len(h)):
    if res[1] > abs(a-(t-(h[i]*0.006))):
        res[0] = i
        res[1] = abs(a-(t-(h[i]*0.006)))
print(res[0]+1)

Solution (Python):
N=int(input())
T, A=map(int,input().split())
p1=list(map(int,input().split()))

p2=list(map(lambda x: abs(x*(-0.006)+T-A), p1))
B=min(p2)

for i in range(N):
    if p2[i]==B:
        print(i+1)
        break

Solution (Python):
N=input()
T,A=map(int,input().split())
L=list(map(int,input().split()))
M=[]

for i in range(1,1+int(N)) :
    M.append(abs(T-(L[i-1]*0.006)-A))
print( M.index(min(M))+1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
l=list(map(int,input().split()))
lis=l.copy()
o=(T-A)/0.006
lis.append(o)
lis.sort()
ind=lis.index(o)
if ind==0:
    print(l.index(lis[1])+1)
else:
    if lis[ind]-lis[ind-1]>lis[ind+1]-lis[ind]:
        print(l.index(lis[ind+1])+1)
    else:print(l.index(lis[ind-1])+1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
h = [t-i*0.006 for i in h]
c = 100000000000
d = 0
for i in range(len(h)):
  b = abs(h[i] - a)
  if c > b:
    c = b
    d = i + 1
print(d)

Solution (Python):
a = int(input())
b = list(map(int,input().split()))
c = list(map(int,input().split()))
x = []

for i in range(a):
  l = abs(b[0] - c[i]*0.006 - b[1])
  x.append(l)
  
print(x.index(min(x)) + 1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
k=[]
for i in range(0,n):
    k.append([h[i],i+1])
k.sort()
s=(t-a)/(6*(10**(-3)))
for i in range(1,n):
    if s-k[i][0]<0:
        if abs(s-k[i][0])>abs(s-k[i-1][0]):
            print(k[i-1][1])
            break
        else:
            print(k[i][1])
            break

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
k=[]
for i in range(0,n):
    k.append([h[i],i+1])
k.sort()
s=(t-a)/(6*(10**(-3)))
for i in range(1,n):
    if s-k[i][0]<0:
        if abs(s-k[i][0])>abs(s-k[i-1][0]):
            print(k[i-1][1])
            break
        else:
            print(k[i][1])
            break

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

diff = abs(A - (T - H[0] * 0.006))
index = 1
for idx, i in enumerate(H):
    temp = T - i * 0.006
    if abs(A - temp) < diff:
        diff = abs(A - temp)
        index = idx + 1
print(index)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
k=[]
for i in range(0,n):
    k.append([h[i],i+1])
k.sort()
s=(t-a)/(6*(10**(-3)))
for i in range(1,n):
    if s-k[i][0]<0:
        if abs(s-k[i][0])>abs(s-k[i-1][0]):
            print(k[i-1][1])
            break
        else:
            print(k[i][1])
            break

Solution (Python):
import math
from functools import reduce
import collections
import itertools
s1 = list(map(int,input().split()))
n = s1[0]
s = list(map(int,input().split()))
t = s[0]
a = s[1]
li = list(map(int,input().split()))
li1 = []
diff = 1000000000000000
ans = 0
co = 0
li2 = []
for i in li:
    co += 1

    if co == 1:
        diff = abs((t-i*0.006)-a)
        ans = 1
    
    
    if abs((t-i*0.006)-a) < diff:
        diff = abs((t-i*0.006)-a)
        ans = co
        


print(ans)

Solution (Python):
import math
N = int(input())
T,A = map(int,input().split())
ans = 0
a = ''
c = 0
for i in input().split():
    c += 1
    x = T - int(i) * 0.006
    b = abs(A-x)
    if a == '' or a > b:
        ans = c
        a = b
print(ans)

Solution (Python):
n=int(input())
t,a=[int(s)for s in input().split()]
h=[int(s) for s in input().split()]

temp=[]
for x in h:
    temp.append(t-0.006*x)
mi=114514
p=0
for i in range(len(temp)):
    dif=abs(temp[i]-a)
    if dif<mi:
        mi=dif
        p=i
print(p+1)

Solution (Python):
N = int(input())
T, A = map(int,input().split())
H = [int(i) for i in input().split()]
ans_i = 1; ans_diff = abs(A - (T - H[0] * 0.006))

for i in range(1,N):
    diff = abs(A - (T - H[i] * 0.006))
    if ans_diff > diff:
        ans_i = i+1
        ans_diff = diff

    
print(ans_i)

Solution (Python):
N = int(raw_input())
T, A = map(int, raw_input().split())
H = map(int ,raw_input().split())
nearT, nearI = 100000, 0
i = 0
while i < N:
  tempelature = T-0.006*H[i]
  if abs(tempelature-A) < nearT:
    nearT = abs(tempelature-A)
    nearI = i
  i+=1
print nearI+1

Solution (Python):


num = input()
temp,target = map(int,input().split())

i = 0
ans = -500
j = 0
for height in map(int,input().split()):
  i += 1
  hoge = temp - 0.006 * height
  if(abs(target - hoge) < abs(target - ans)):
    ans = hoge
    j = i

print(j)

Solution (Python):
n = int(input())
t, a = map(int,input().split())
result = 0
min_dif = 9999999

for i, x in enumerate(map(int, input().split())):
    if min_dif > abs(a - (t - x * 0.006)):
        result = i+1
        min_dif = abs(a - (t - x * 0.006))

print(result)

Solution (Python):

N = int(input())
T, A = map(int, input().split())
li_H = list(map(int, input().split()))

tmp = 10000
cnt = 0
for i, h in enumerate(li_H):
    t = T - h * 0.006
    diff_ave = abs(t-A)
    if diff_ave < tmp:
        tmp = diff_ave
        cnt = i+1
print(cnt)

Solution (Python):
N = int(input())
T, A = input().split(' ')
T = int(T)
A = int(A)
line = input().split(' ')

minScore = abs(A-(T-int(line[0]) * 0.006))
minIndex = 1
for i in range(N):
    h = int(line[i])
    temp = abs(A-(T - h * 0.006))
    if temp < minScore:
        minScore = temp
        minIndex = i + 1

print (minIndex)

Solution (Python):
"""
B - Palace
"""

def simple_input():
    temp_input = input().rstrip().split(' ')
    if len(temp_input) > 1:
        return temp_input
    return temp_input[0]


if __name__ == '__main__':
    
    n = simple_input()
    t,a = simple_input()
    h = simple_input()
    n = int(n)
    t = int(t)
    a = int(a)
    
    a_min = None
    index = 0

    for i in range(n):
        kion = t - int(h[i]) * 0.006
        t_min = abs(a - kion)
        if(a_min is None or a_min > t_min):
            a_min = t_min
            index = i

    
    print("{0}".format(index+1))

Solution (Python):
n = int(input())
t,a = map(int, input().split())
li = list(map(int, input().split()))
li_2 = []

for i in range(n):
    li_2.append(abs(a - t +li[i] *0.006))
    
x = li_2.index(min(li_2)) + 1
print(x)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))

best_d = float('inf')
best_i = -1

for i,x in enumerate(H):
    t = T - x * 0.006
    d = abs(A - t)
    if d < best_d:
        best_d = d
        best_i = i
print(best_i + 1)

Solution (Python):
N = int(input())
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))

abs_list = [abs(A - (T - i*0.006)) for i in H]
ans = abs_list.index(min(abs_list))

print("{} ".format(ans+1))

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))

best_d = float('inf')
best_i = -1

for i,x in enumerate(H):
    t = T - x * 0.006
    d = abs(A - t)
    if d < best_d:
        best_d = d
        best_i = i
print(best_i + 1)

Solution (Python):
N = int(input())
T,A = map(int, input().split())
H_list = map(int, input().split())

H_list1 = []
for i,h in enumerate(H_list):
    H_list1 = H_list1 + [abs(A-(T - h*0.006)),]
print(H_list1.index(min(H_list1))+1)

Solution (Python):


N = int(input())
T,A = map(int, input().split())
hN = list(map(int, input().split()))

tN = [0] * N
ans = -1
tmp = float('inf')
for i in range(N):
    tN[i] = T - hN[i] * 0.006
    if abs(tN[i] - A) < tmp:
        tmp = abs(tN[i] - A)
        ans = i + 1
print(ans)

Solution (Python):
from sys import stdin

def main():
    N = int(input())
    T, A = map(int, input().split())
    H = map(int, input().split())

    temp = [T - x * 0.006 for x in H]
    diff = float('inf')
    ans = 0
    for i, a in enumerate(temp, start=1):
        b = abs(A - a)
        if not b:
            print(i)
            return
        elif diff > b:
            ans, diff = i, b
    print(ans)

input = lambda: stdin.readline()
main()

Solution (Python):
N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
keep = 0

for i in range(len(H)):
  if( abs( T-0.006*H[keep] -A ) > abs( T-0.006*H[i] -A )):
    keep = i

print(keep+1)

Solution (Python):
def f(x):
    if x>=0:
        return x
    else:
        return -x
a=int(input())
b,c=(map(int,input().split(" ")))
d=list(map(int,input().split(" ")))
e=float("inf")
g=0
for x in range(1,len(d)+1):
    if e>=f(c-(b-d[x-1]*0.006)):
        e=f(c-(b-d[x-1]*0.006))
        g=x
print(g)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
cand = 10**9
ans = 0
for i in range(N):
  temp = T - H[i] * 0.006
  if abs(A - temp) < cand:
    cand = abs(A - temp)
    ans = i + 1    
print(ans)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))

d=[]
l={}
for i in range(n):
  x=h[i]
  avg_t= t - x * 0.006
  d.append(abs(avg_t - a))
  l[d[i]]=i+1

min=min(d)
print (l[min])

Solution (Python):
n = int(input())
t, a = list(map(int,input().split()))
H = list(map(int,input().split()))
best = 1000000000
bestid = -10
for i in range(n):
  if abs(a-(t-H[i]*0.006)) < best:
    best = abs(a-(t-H[i]*0.006))
    bestid = i+1
print(bestid)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
Hs = list(map(int, input().split()))
diff = 100000000
ans = 0
for i in range(N):
    tmp = abs(A - T + Hs[i] * 0.006)
    if diff > tmp: 
        diff = tmp
        ans = i+1

print(ans)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=input().split()
h=list(map(int,h))
b=[]
for i in range(n):
    b.append(abs(a-(t-0.006*h[i])))   
min=b[0]
if n!=1:
    j=0
    for i in range(1,n):
        if b[i]<min:
            min=b[i]
            j=i  
    print(j+1)            
else:
    print(1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h_list=list(map(int,input().split()))

res_list=[]

for i in range(n):
    res_list.append(abs(a-(t-h_list[i]*0.006)))

print(res_list.index(min(res_list))+1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=[int(i) for i in input().split()]

temp=[]
for i in range(N):
    temp.append(abs(T-H[i]*0.006-A))

print(temp.index(min(temp))+1)

Solution (Python):
n = int(input())
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))

a_diff = [abs((t - hi * 0.006) - a) for hi in h]

x, x_ind = a_diff[0], 0
for i, e in enumerate(a_diff[1:]):
    if e < x:
        x, x_ind = e, i + 1

x_ind += 1
        
print(x_ind)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = input().split()

t_diff = [abs(a-(t-int(h_)*0.006)) for h_ in h]
ans = 0
ans_diff = 9999
for idx,t_diff_ in enumerate(t_diff):
    if ans_diff > t_diff_:
        ans_diff = t_diff_
        ans = idx
print(ans+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
d = 120000
j = -1
for i in range(N):
	temp = T-H[i]*0.006
	if abs(A-temp) < d :
		j = i
		d = abs(A-temp)

print(j+1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
res = 10**4
now = 10**10

for i in range(len(h)):
    if abs((t-(h[i]*0.006))-a) < now:
        res =  i+1
        now = abs((t-(h[i]*0.006))-a) 
else:
    print(res)

Solution (Python):
N = int(input())
T, A = map(int,input().split())
H = [int(x) for x in input().split()]
h = [T - (x * 0.006) for x in H]
ans = [abs(A - x) for x in h]

print(ans.index(min(ans)) + 1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
Hs = list(map(int, input().split()))

ans = 0
minDiff = float('inf')
for i, H in enumerate(Hs, 1):
    temp = T - 0.006 * H
    if abs(temp - A) < minDiff:
        ans = i
        minDiff = abs(temp - A)

print(ans)

Solution (Python):
n = int(input())
t, a = map(int,input().split())
h_a = (t - a) / 0.006
h = list(map(int,input().split()))
m = 10**5
j = -1

for i in range(len(h)):
    h[i] = h[i] - h_a
    if h[i] < 0:
        h[i] = -h[i]
    if m > h[i]:
        m = h[i]
        j = i

print(j+1)

Solution (Python):
n = int(input())
[t,a] = list(map(int,input().split()))
h = list(map(int,input().split()))
ans = 0
point=1000

for i in range(n):
	if point > abs( t-0.006*h[i] -a):
		point =abs( t-0.006*h[i] -a)
		ans = i+1
	
print(ans)

Solution (Python):




def main():
    n = int(input())
    t, a = list(map(int, input().split()))
    hs = list(map(int, input().split()))
    best_t, best_i = None, None
    for i, h in enumerate(hs):
        temp = t - h * 0.006
        if best_t is None or abs(temp - a) < best_t:
            best_t = abs(temp - a)
            best_i = i+1
    print(best_i)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())

[t, a]=[int(i) for i in input().split()]

h=[int(i) for i in input().split()]

ans=[]
for i in h:
    temp=t-a-0.006*i
    if temp <0:
        ans.append(temp*-1)
    else:
        ans.append(temp)

mi=ans[0]
num=0
for j, i in enumerate(ans):
    if mi > i:
        mi=i
        num=j

print(num+1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))


ans = 1
c = h[0]
d = abs(h[0]-a)
h = [t-0.006*i for i in h]

for i in range(n):
    if abs(h[i]-a)<d:
        d=abs(h[i]-a)
        ans = i+1

print(ans)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))

d=[abs(T-h*0.006-A) for h in H]
print(d.index(min(d))+1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
dif = abs(T - H[0] * 0.006 - A)
result = 1

for i in range(1, N):
    if abs(T - H[i] * 0.006 - A) < dif:
        dif = abs(T - H[i] * 0.006 - A)
        result = i + 1

print(result)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
TT = [abs(A - (T - H[i] * 0.006)) for i in range(N)]
TTT = sorted(TT)
print(TT.index(TTT[0])+1)

Solution (Python):
N = int(input())
T, A = list(map(int, input().split()))
tmp = list(map(int, input().split()))
H = {}
for i in range(len(tmp)):
    H[i] = tmp[i]


minT = 1e10
ans = 0
for i,h in sorted(H.items(), key=lambda x: x[1]):
    t = T - h*0.006
    
    if abs(t - A)<minT:
        minT = abs(t - A)
        ans = i+1
print(ans)

Solution (Python):
N = int(input())
T, A = (int(i) for i in input().split())
H = list(int(i) for i in input().split())

a = 0
c = 999
d = 0
for i in range(N):
    a = T - H[i]*0.006
    if c > abs(A-a):
        c = abs(A-a)
        d = i

print(d+1)