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):
import numpy as np


num = int(input())
t, a = map(int, input().split())


h = np.array(list(map(int, input().split())))
b = t - 0.006 * h
i = np.argmin(np.abs(b - a))

print(i + 1)

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

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

ave_dis = None
num = 0

for i in range(1, N+1):
    ave = T - H[i-1]*0.006

    ave_dis_tmp = abs(A - ave)

    if ave_dis == None or ave_dis > ave_dis_tmp:
        num = i
        ave_dis = ave_dis_tmp

print(num)

Solution (Python):
import statistics as st



nn = int(input())
base_temp, ave_temp = map(int, input().split())
hh = [int(i) for i in input().split()]
'''

n=2
base_temp = 12
ave_temp = 5
hh = [1000, 2000, 1200]
'''

def temp(b, h):
    return b - h * 0.006

list = []

for h in hh:
    list.append(temp(base_temp, h))






list2 = [abs(i - ave_temp) for i in list]


print(list2.index(min(list2)) + 1)
'''
for h in hh:
    list2.append(temp(base_temp, h))
'''

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

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

Solution (Python):
import sys


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

result = -1
min_diff_of_temprature = sys.maxsize
for i in range(n):
    diff_of_temprature = abs(a - (t - 0.006 * h[i]))
    if diff_of_temprature < min_diff_of_temprature:
        result = i
        min_diff_of_temprature = diff_of_temprature

print(result + 1)

Solution (Python):

input()
b = list(map(int,input().split()))
t = b[0]
a = b[1]
c = list(map(int,input().split()))
c_temp = [abs(a-(t-i*0.006)) for i in c]
print(c_temp.index(min(c_temp))+1)

Solution (Python):
n = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
a = []
ans = 0
saitekionndo = 1000000000000
for i in range(n):
    a.append([abs((T-H[i]*0.006)-A)])
    if abs((T-H[i]*0.006)-A)<saitekionndo:
        saitekionndo = abs((T-H[i]*0.006)-A)
        ans = i+1
print(ans)

Solution (Python):
n = int(input())
t, a = [int(x) for x in input().split()]
h = [int(x) for x in input().split()]
l = [(i, abs(a - (t - x * 0.006))) for i, x in enumerate(h)]
target = min(l, key = lambda x: x[1])
print(target[0]+1)

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

for x in h:
    l.append(abs(a - (t - x * 0.006)))

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

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

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

H=[int(x) for x in input().split()]

ans=0
cnt=10**10

for i in range(N):
  temp = T-H[i]*0.006
  if abs(A-temp) < abs(A-cnt):
    ans=i
    cnt=temp
print(ans+1)

Solution (Python):
i=input;i();t,a=map(int,i().split());l=list(map(lambda x:abs(t-int(x)*0.006-a),i().split()));print(l.index(min(l))+1)

Solution (Python):
input();t,a=map(int,input().split());l=list(map(lambda x:abs(t-int(x)*0.006-a),input().split()));print(l.index(min(l))+1)

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

best = 9999
ans = 0
for i in range(1,N+1):
    h = H[i-1]
    if abs(A-(T-h*0.006))<best:
        best = abs(A-(T-h*0.006))
        ans = i
        
        
print(ans)

Solution (Python):

N = int(input())
T, A = map(int, input().split())
Hs = list(map(int, input().split()))
hikaku = 1000000

result = 0

for i in range(len(Hs)):
    temp = T - (Hs[i] * 0.006)
    sa = abs(temp - A)
    if sa < hikaku:
        hikaku = sa
        result = i + 1

print(result)

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

Solution (Python):
import sys

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

idx_of_result = 0
min_diff = sys.maxsize
for i, h_i in enumerate(h):
    temprature = t - h_i * 0.006
    diff = abs(temprature - a)
    if diff < min_diff:
        min_diff = diff
        idx_of_result = i

print(idx_of_result + 1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
delta = float('inf')
index = 0

for i, v in enumerate(h):
  temp = abs(a - (t - v * 0.006))
  if temp < delta:
    delta = temp
    index = i+1

print(index)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = [h for h in map(int,input().split())]
list = []
for _ in H:
    kion = T-(_*0.006)
    sa = abs(A-kion)
    list.append(sa)
list2 = [x for x in list]
list.sort()
best = list[0]
print(list2.index(best)+1)

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

n = 0
for i in range(N):
    if abs(A - (T - H[i] * 0.006)) < abs(A - (T - H[n] * 0.006)):
       n = i

print(n + 1)

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

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

ans = 0
for i in range(N):
    if abs(T-0.006*H[i]-A) < abs(T-0.006*H[ans]-A):
        ans = i

print(ans+1)

Solution (Python):
N = int(input())
input2 = input()
t,a = input2.split(' ')
T = int(t)
A = int(a)
input3 = input()
H = list(map(int,input3.split(' ')))

answer = 0
min = 0
for i in range(N):
    heikin = T - H[i] * 0.006
    
    
    
    if i != 0:
        if min > abs(A - heikin):
            min = abs(A - heikin)
            answer = i + 1
    else:
        min = abs(A - heikin)
        answer = 1
print(answer)

Solution (Python):
def main():
    N = int(input())
   
    T,A = list(map(int,input().split()))
    H = list(map(int,input().split()))
    diff = []
    for i in H:
        diff.append(abs(A - (T - i*0.006)))
    print(diff.index(min(diff)) + 1)
    
if __name__ == '__main__':
    main()

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

temps = []
for i in highs:
    diff = abs(A - (T - i*0.006))
    temps.append(diff)
    
print(temps.index(min(temps))+1)

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

temps = []
for i in range(N):
    temps.append(abs(A-(T-highs[i]*0.006)))
print(temps.index(min(temps))+1)

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

diff = 10000
point = 10000

for x in range(n):
    temp = t - int(h[x]) * 0.006
    tmp = abs(a - temp)

    if tmp < diff:
        diff = tmp
        point = x + 1

print(point)

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

diffs = list(map(lambda h: abs(a - (t - h * 0.006)) , hs))
minind = diffs.index(min(diffs)) + 1
print(minind)

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

import sys
diff_of_min = sys.maxsize
idx_of_min = 0
for i, h_i in enumerate(h):
    temprature = t - h_i * 0.006
    diff = abs(a - temprature)
    if diff < diff_of_min:
        idx_of_min = i
        diff_of_min = diff

print(idx_of_min + 1)

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

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10**5)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
t,a = li()
h = list(li())

ans = -1
res = 10**18
for i,hi in enumerate(h):
    if abs(a-(t-0.006*hi)) < res:
        res = abs(a-(t-0.006*hi))
        ans = i+1
        
print(ans)

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

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

diff = float('inf')
ans = 0

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

print(ans)

Solution (Python):
import sys
fin = sys.stdin.readline

N = int(fin())
T, A = [int(elem) for elem in fin().split()]
avg_temps = [1000 * T - 6 * int(elem) for elem in fin().split()]

min_diff = float('inf')
closest_place = -1

for place, avg_temp in enumerate(avg_temps, start=1):
    diff = abs(avg_temp - 1000 * A)
    if diff < min_diff:
        min_diff = diff
        closest_place = place

print(closest_place)

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

ans_i = -1
ans_d = 10**18
for i,h in enumerate(H):
    t = T - h * 0.006
    if abs(t-A) < ans_d:
        ans_d = abs(t-A)
        ans_i = i
print(ans_i + 1)

Solution (Python):
def Ave_tmp(Hi):
    return T-Hi*0.006

n = int(input())
T, A = map(int, input().split())
H_list = list(map(int, input().split()))

Ave_tmp_list = list(map(Ave_tmp, H_list))

min = 1000000000
ans = 0
for i, Ave_tmp in enumerate(Ave_tmp_list):
    if(abs(Ave_tmp - A) < min):
        min = abs(Ave_tmp - A)
        ans = i+1

print(ans)

Solution (Python):
n = int(input())
m = input()
t = int(m.split()[0])
a = int(m.split()[1])
c = None
d = 9999
k = input().split()
for i in range(n):
    w = t - int(k[i]) * 0.006
    if abs(a - w) < d:
        c = i+1
        d = abs(a - w)
print(c)

Solution (Python):
import sys
N = input()
TA = input()
T, A = TA.split()
Hinp = input()
H = Hinp.split()
ansnum = None
ans = 0
def getdiff(A, ans):
    return abs(max(ans, A) - min(ans, A))
def chk(A, _ans, ans):
    new_d, old_d = getdiff(A, _ans), getdiff(A, ans)
    if new_d < old_d:
        return True
    return False
def showans(ans):
    print(ans)
    sys.exit()
for i, x in enumerate(H):
    _ans = int(T) - int(x) * 0.006
    if _ans == A:
        showans(i+1)
    if not ansnum or chk(int(A), _ans, ansnum):
        ans = i+1
        ansnum = _ans
showans(ans)

Solution (Python):
import sys
N = input()
TA = input()
T, A = TA.split()
Hinp = input()
H = Hinp.split()
ansnum = None
ans = 0
def getdiff(A, ans):
    return abs(max(ans, A) - min(ans, A))
def chk(A, _ans, ans):
    new_d, old_d = getdiff(A, _ans), getdiff(A, ans)
    if new_d < old_d:
        return True
    return False
for i, x in enumerate(H):
    _ans = int(T) - int(x) * 0.006
    if _ans == A:
        break
    if not ansnum or chk(int(A), _ans, ansnum):
        ans = i+1
        ansnum = _ans
print(ans)

Solution (Python):
N=int(input())
TA=input().split(" ")
T = int(TA[0])
A = int(TA[1])
H=input().split(" ")
ans = 1
diff = abs(T - int(H[0]) * 0.006 - A)
for i in range(N):
    
    if( diff > abs(T - int(H[i]) * 0.006 - A) ):
        diff = abs(T - int(H[i]) * 0.006 - A)
        ans  = i + 1
print(ans)

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

ans, best = 0, float('inf')
for i in range(N):
    x = H[i]
    temp = (T - x * 0.006)
    diff = abs(A - temp)
    if best > diff:
        ans = i
        best = diff
print(ans + 1)

Solution (Python):
T=int(input())
a,b=map(int,input().split())
ll=list(map(int,input().split()))
mins=0
for i in range(len(ll)):
    ans=a-0.006*ll[i]
    if abs(ans-b)<abs((a-0.006*ll[mins])-b):
        mins=i

print(mins+1)

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

for i in range(N):
  H_temp[i] = abs(float(A) - float(T - H[i] * 0.006))

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

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

min = abs((t - h[0] * 0.006) - a)
mini = 0

for i in range(1,len(h)):
    tmp = abs((t - h[i] * 0.006) - a)

    if tmp < min :
        min = tmp
        mini = i     
        
print(mini+1)

Solution (Python):


N = int(input())

T, A = map(int, input().split())

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

answer = 0

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

answer += 1
print(answer)

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

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

diff = [0] * N
for n in range(N):
  ave_temperature = T - H[n] * 0.006
  diff[n] = abs(A - ave_temperature)
  
print(diff.index(min(diff)) + 1)

Solution (Python):
n = int(input())
temp = list(map(int, input().split()))
t = temp[0]
a = temp[1]
highs = list(map(int, input().split()))

answer = 0
close = -1
for i in range(n):
    high = highs[i]
    c = abs(a - (t - high * 0.006))
    if close < 0 or c < close:
        close = c
        answer = i
print(answer + 1)

Solution (Python):
import numpy as np
n = input()
t, a = map(int, raw_input().split())
h = map(int, raw_input().split())
v = map(lambda _: abs(t - 0.006*_ - a), h)
print np.argmin(v) + 1

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

kion = list(map(float, list(map(lambda x: t-x*0.006, h))))
sub = list(map(float, list(map(lambda x: abs(a-x), kion))))

temp = sub.copy()
temp.sort()
index = sub.index(temp[0])

print(index+1)

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

X = [abs(T - h * 0.006 - A) for h in H]
m = min(X)

for i, x in enumerate(X):
    if x == m:
        print(i+1)

Solution (Python):



import sys

def main():
    N = int(input())
    T, A = map(int, input().split())
    H = [v for v in map(int, input().split())] 
    result = sys.float_info.max
    for i in range(0, N):
        tmp = abs(A - (T - H[i] * 0.006))
        if  tmp < result:
            result = tmp
            answer = i + 1

    print(answer)


if __name__ == "__main__":
    main()

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

b,c=map(int,input().split())
d=[int(i) for i in input().split()]

e={}
for i in range(a):
	e.update({abs(b-d[i]*0.006-c):i+1})

e=sorted(e.items())

print(e[0][1])

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
ans_k = float("inf")
for i in range(n):
    kion = t - (h[i] * 0.006)
    if abs(ans_k - a) > abs(kion - a):
        ans_k = kion
        ans = i
print(ans + 1)

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

place_temperature = 0
diff_A =[]
for i in range(N):
    place_temperature= T - height[i] * 0.006
    diff_A.append(abs(A - place_temperature))

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

Solution (Python):
import numpy as np

def getNearestValue(list, num):
    """
    概要: リストからある値に最も近い値を返却する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return list[idx]

num = int(input())
temperature = list(map(int, input().split(" ")))
height = list(map(int, input().split(" ")))

place_temperature = []
for i in range(num):
    place_temperature.append(temperature[0] - height[i] * 0.006) 


near_temperature = getNearestValue(place_temperature, temperature[1])
print(place_temperature.index(near_temperature) + 1)

Solution (Python):
from sys import stderr, setrecursionlimit
from functools import reduce
from operator import add
setrecursionlimit(2147483647)
def f(): return [int(i) for i in input().split()]
def yes(n): print("Yes" if n else "No")
def debug(*x, sep=" ", end="\n"):
    for item in x:
        stderr.write(str(item))
        stderr.write(sep)
    stderr.write(end)

n = int(input())
t, a = f()
h = [abs(t-i*0.006 - a) for i in f()]
print(h.index(min(h))+1)

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

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = list(map(int, input().split()))
k = []
for i in h:
  k.append(abs(t - a - i * 0.006))
print(k.index(min(k))+1)

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

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

min_i, min_d = None, 10 ** 6
for i, hi in enumerate(H):
    d = abs(A - (T - 0.006 * hi))
    if d < min_d:
        min_i = i + 1
        min_d = d
        if d == 0:
            break

print(min_i)

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

E = 1e+10
p = -1
for i in range(N):
    a = T - 0.006 * H[i]
    e = abs(A - a)
    if e < E:
        E = e
        p = i

print(p+1)

Solution (Python):
n=int(input())
t,a=list(map(int,input().split()))
h=list(map(int,input().split()))
gap = [(i,abs(a - t + s*0.006)) for i,s in enumerate(h)]

print(sorted(gap, key=lambda x:x[1])[0][0] + 1)

Solution (Python):
i=lambda:map(int,input().split())
i()
t,a=i()
c=[abs(t-0.006*b-a)for b in i()]
print(c.index(min(c))+1)

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

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

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

li = abs((t-lis[0]*0.006)-a)
l = 0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Solution (Python):
i=lambda:map(int,input().split());i();t,a=i();c=[abs(t-0.006*b-a)for b in i()];print(c.index(min(c))+1)

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

diff = [0] * N
for n in range(N):
    ave_temperature = T - H[n] * 0.006
    diff[n] = abs(A - ave_temperature)

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

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

min = (A-(T-0.006*H[0]))**2
ans = 0

for i in range(1,N):
    if min > (A-(T-0.006*H[i]))**2:
        min = (A-(T-0.006*H[i]))**2
        ans = i

print(ans+1)

Solution (Python):

from sys import stdin
import numpy as np

d_in = lambda: int(stdin.readline())  
ds_in = lambda: list(map(int, stdin.readline().split()))  


coef = 0.006
N = d_in()
T, A = ds_in()
H_list = np.array(ds_in())

T_list = T - coef * H_list
idx = np.argmin((A - T_list)**2)
print(idx + 1)

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = input().rstrip().split()
hh = []
for i in range(n):
  j = abs(t - a - int(h[i]) * 0.006)
  hh.append(j)
print(hh.index(min(hh))+1)

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

Solution (Python):
import sys

if __name__ == '__main__':
    N = int(input())
    T, A = map(int, input().split())
    H = list(map(int, input().split()))

    ans = 0
    best = sys.maxsize
    for i in range(0, N):
        target = T - 0.006 * H[i] - A
        if abs(target) < best:
            best = abs(target)
            ans = i + 1

    print(ans)

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

Solution (Python):

N = int(input())

T, A = map(int, input().split())

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

min_index = [abs(A - (T - i*0.006)) for i in H]

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

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

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

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

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

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

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

H_temp = [abs(A-(T-0.006*i)) for i in H]

for i in range(len(H_temp)):
    if H_temp[i] == min(H_temp):
        print(i+1)

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

H_temp = [abs(A-(T-0.006*i)) for i in H]

temp = 999999
best_spot = None

for i in range(len(H_temp)):
    if H_temp[i] < temp:
        temp = H_temp[i]
        best_spot = i+1

print(best_spot)

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

mint = 1000000
j = 0

for i in range(N):
    if mint > abs(a[1]-(a[0] - h[i] * 0.006)):
        mint = abs(a[1]-(a[0] - h[i] * 0.006))
        j = i + 1

print(j)

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

minAH, mini = 10000000, None
for i in range(N):
    AH = abs(A - (T - Hs[i] * 0.006))
    if minAH > AH:
        minAH = AH
        mini = i + 1
print(mini)

Solution (Python):
def main():
    N = int(input())
    T, A = map(int, input().strip().split())
    H = list(map(int, input().strip().split()))
    t = []
    
    for h in H:
        arg_t_a = T - h * 0.006 - A
        t.append(arg_t_a * arg_t_a)
    print(t.index(min(t)) + 1)

if __name__ == "__main__":
    main()

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


min_diff = 10**5
min_i = 0
for idx, height in enumerate(H):
    temperature = T - 0.006*height
    diff = abs(temperature - A)
    if min_diff > diff:
        min_i = idx
        min_diff = diff

print(min_i+1)

Solution (Python):
input()
tmp = list(map(int, input().split(" ")))
T = tmp[0]
A = tmp[1]
H = list(map(int, input().split(" ")))

ans_diff = 999999
ans = -1

for i in range(len(H)):
    if abs(A - (T - (H[i] * 0.006))) < ans_diff:
        ans_diff = abs(A - (T - (H[i] * 0.006)))
        ans = i + 1

print(ans)

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

min_ave = 1000000

for i in range(len(H)):
    tem = T - (H[i]*0.006)
    if min_ave > abs(A-tem):
        min_ave = abs(A-tem)
        min_num = i+1

print(min_num)

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

diff = 1000000
index = 0
for i in range(n):
    tmpDiff = abs(a - (t-h[i]*0.006))
    if tmpDiff < diff:
        diff = tmpDiff
        index = i
print(index+1)

Solution (Python):

import math

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

for i in range(n):
    h[i]=abs((t-h[i]*0.006)-a)
    
print(h.index(min(h))+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 - x*0.006) - a), h))

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

Solution (Python):
N = int(input())
T,A = map(int,input().split())
res = 0
diff = 10000
Hlist = input().split()
Hlist = [int(i) for i in Hlist]
for i in range(N):
    H = Hlist[i]
    average = T - H * 0.006
    a = abs(A-average)
    if diff >= a:
        res = i
    diff = min(diff,a)
print(res+1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = input().split()
min = 1000000000
place = 0

for i in range(N):
  d = (T*1000 - int(H[i])*6) - A * 1000
  if d < 0: d = -d
  if d < min:
    min = d 
    place = i+1

print(place)

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

T, A = map(int, input().split())

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

mi = abs(T-H[0]*0.006-A)
num = 1

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

Solution (Python):


def solve():
    _ = input()
    T, A = map(int, input().split())
    x = list(map(int, input().split()))
    nearest = 10 ** 5
    ans = 0

    for index, elevation in enumerate(x):
        current = T - elevation * 0.006

        if abs(A - current) < nearest:
            nearest = abs(A - current)
            ans = index + 1

    print(ans)


if __name__ == '__main__':
    solve()

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

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

Solution (Python):
_ = input()
t, desire = map(int, input().split())
places_h = map(int, input().split())

def desire_delta(place_h, t, desire):
  avg_tmp = t - place_h * 0.006
  return max(desire - avg_tmp, avg_tmp - desire)

res = [(idx, desire_delta(h, t, desire)) for idx, h in enumerate(places_h)]

sorted_res = sorted(res, key=lambda place: place[1])

print(sorted_res[0][0] + 1)

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

K = abs(A - (T - H[0] * 0.006))
x = 0
ans = 0

for i in H:
    x += 1
    if K >= abs(A - (T - i * 0.006)):
        K = abs(A - (T - i * 0.006))
        ans = x

print(ans)

Solution (Python):
def main():
  n = input()
  t, a = map(int, input().split())
  h = list(map(lambda x: abs(a-(t-x*0.006)), map(int, input().split())))
  print(sorted(range(len(h)), key=lambda k: h[k])[0]+1)
  
if __name__ == '__main__':
  main()

Solution (Python):
N=int(input())
T,A=map(int,input().split())
ans=0
x=list(map(int,input().split()))
min=float("inf")
for i in range(N):
    a=abs(A-(T-x[i]*0.006))
    if a<min:
        ans=i
        min=a
print(ans+1)

Solution (Python):
N=int(input())
T,A=map(int,input().split())
lis=list(map(int,input().strip().split()))
kekka=[]
a=len(lis)
for i in range (0,a):
    b=T-lis[i]*0.006
    if A>=b:
        c=A-b
    else:
        c=b-A
    c=abs(c)
    kekka.append(c)
d=min(kekka)
e=kekka.index(d)
print(e+1)

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
tmp = float('inf')
for i in range(N):
    t = abs(A-(T-H[i]*0.006))
    if tmp > t:
        tmp = t 
        ans = i
print(ans+1)

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
h = 0
D = 100000000
for x in H:
    d = abs(T - x * 0.006 - A)
    if D > d:
        D = d
        h = x
print(H.index(h) + 1)

Solution (Python):
n = int(input())
T,a = map(int,input().split())
li = list(map(int,input().split()))

m = 10**100
count = 0

for i in range(n):
    t = T - li[i] * 0.006
    if abs(t-a) < abs(m-a):
        m = t
        count = i+1

print(count)

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

temp = []
for i in h:
    temp.append(t - i * 0.006)

near = 10001
ans = 0
for i, v in enumerate(temp):
    sub = a - v
    if abs(near) > abs(sub):
        near = sub
        ans = i+1

print(ans)

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

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


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

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

l = 10**9
for i in range(len(h)):
    tmp = abs(a - (t - h[i]*0.006))
    if l > tmp:
        l = tmp
        ans = i+1
print(ans)

Solution (Python):
n = int(input())
t,a=map(int,input().split())
h = list(map(int,input().split()))
ans_num = 1<<30
ans = -1

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

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

cs = [(index,abs(A- (T-h*0.006))) for index,h in enumerate(Hs)]
cs = min(cs, key=lambda x:x[1])
print(cs[0]+1)

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

res, height = 0, 100001
for i in range(N) :
    tmp = T - H[i] * 0.006
    if height > abs(A - tmp) :
        height = abs(A - tmp)
        res = i + 1

print(res)

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

Solution (Python):
import numpy as np

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

h = np.array(h, dtype = float)
h = t - 0.006 * h
h = abs(a-h)
print(np.argmin(h)+1)