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 unittest
from io import StringIO
import sys


def input():
    return sys.stdin.readline().rstrip()


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

    ans = 1
    tmpt = float('inf')
    for i in range(N):
        tmp = abs(T-H[i]*0.006-A)
        if tmp == min(tmp, tmpt):
            tmpt = tmp
            ans = i+1
    print(ans)


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2
12 5
1000 2000"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3
21 -11
81234 94124 52141"""
        output = """3"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

Hnp = np.array(H)
temp = np.abs(T - Hnp * 0.006 - A)
print(temp.tolist().index(min(temp)) + 1)

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

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

ideal_hight = int((T - A) / 6 * 1000)

close_hight = 500000
close_hight_id = 0

for i in range(0, N):
    if abs(ideal_hight - H[i]) <= close_hight:
        close_hight = abs(ideal_hight - H[i])
        close_hight_id = i

print(close_hight_id + 1)

Solution (Python):
N = int(input())
T, A = [int(s) for s in input().split(' ')]
Ht = [T - int(s) * 0.006 - A for s in input().split(' ')]

ret = min(zip(range(1, len(Ht)+1), Ht), key=(lambda x: abs(x[1])))
print(ret[0])

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

Solution (Python):
n = int(input())
t, a = [int(i) for i in input().split()]
h = [int(j) for j in input().split()]
value = 100000
ret = 0
for i, k in enumerate(h):
    tmp = abs((t - k * 0.006) - a)
    if tmp < value:
        ret = i
        value = tmp
print (ret + 1)

Solution (Python):
import os, sys, re, math

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

best_diff = 1000
best_index = 0

for i in range(N):
    t = T - H[i] * 0.006
    diff = abs(t - A)
    if diff < best_diff:
        best_index = i
        best_diff = diff

print (best_index + 1)

Solution (Python):
n = int(input())
t, target = map(int, input().split())
a = list(map(int, input().split()))
print(sorted([(a[i], i + 1) for i in range(n)], key=lambda x: abs(target - (t - x[0] * 0.006)))[0][1])

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

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

print(ans+1)

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

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

tmp_diff_list = [abs(t-i*0.006-a) for i in list(map(int, input().split()))]

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h, i = min(zip(map(int, input().split()), range(n)), key=lambda hi: abs(t - hi[0] * 0.006 - a))
print(i + 1)

Solution (Python):
N = input()
T_A = input().split()
T = int(T_A[0])
A = int(T_A[1])
H_list = list(map(int, input().split()))

i = 1
i_H_list = []
for H in H_list:
    ave_T = T - H * 0.006
    i_H_list.append([i, abs(A - ave_T)])
    i += 1

min_diff = -1
min_diff_i = -1
for i in range(len(H_list)):
    if min_diff > i_H_list[i][1] or min_diff == -1:
        min_diff = i_H_list[i][1]
        min_diff_i = i_H_list[i][0]
print(min_diff_i)

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

temperatures =[]
for hight in hights:
    temperature = T - hight*0.006
    temperatures.append(temperature)

ans = 10**9
for temp in temperatures:
    sub = abs(temp-A)
    if sub < ans:
        ans = sub
        ans_number = temperatures.index(temp)

print(ans_number+1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
ans=[]
for i in range(n):
    ans.append(abs(a-(t-0.006*h[i])))

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

Solution (Python):

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

h= list(map(int,input().split()))
ta=[]
for i in range(len(h)):
    ta.append(abs( a-(t-h[i]*0.006)))

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

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

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

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

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

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

mind=10**9

for i in range(N):
    if abs(H[i]-H0)<mind:
        ans=i+1
        mind=abs(H[i]-H0)

print(ans)

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

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

m = 1000
for i in range(n):
  d=t-h[i]*0.006
  if abs(a-d) < m:
    m = abs(a-d)
    c = i
print(c+1)

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

Solution (Python):
N = input()
TA = list(map(float,input().split()))
H = list(map(float,input().split()))
temp = 99999999999999.999
ind = 0
for x in H:
	if temp > abs(TA[1] -(TA[0]-x*0.006)):
		temp = abs(TA[1] -(TA[0]-x*0.006))
		ind = H.index(x)
print(ind+1)

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

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

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

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

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

best_t = 10**3
ans = 0

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

print(ans)

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

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

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

Solution (Python):


N = int(input().split()[0])
T, A = list(map(int, input().split()))
h_list = list(map(int, input().split()))
min_diff = float("inf")
target = -1

for i, h in enumerate(h_list):
    m = T - h * 0.006
    if abs(m - A) < min_diff:
        target = i + 1
        min_diff = abs(m - A)

ans = target
print(ans)

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

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

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

point = -1
temp_diff = float('inf')
for i, h in enumerate(H):
  temp = T - h * 0.006
  if abs(A - temp) < temp_diff:
    point = i+1
    temp_diff = abs(A - temp)
print(point)

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

    palace_place = -1
    minimam_difference = 0
    for i, h in enumerate(H):
        temperature = T - (h*0.006)
        temperature_difference = abs(A-temperature)
        if i == 0 or minimam_difference > temperature_difference:
            minimam_difference = temperature_difference
            palace_place = i
    
    print(palace_place+1)


if __name__ == "__main__":
    main()

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

for i in range(0,len(H)):
  H[i]=abs(1000*a-t*1000+H[i]*6)
  
print(H.index(min(H))+1)

Solution (Python):


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

min=1000000000
for i in range(N):
    diff = abs((T-H[i]*0.006)-A)
    if (min>diff):
        min = diff
        point = i+1
print(point)

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

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

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

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

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

Solution (Python):
import numpy as np

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

n = int(input())
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))
tmps = []
for i in range(n):
    ave_t = t - h[i]*0.006
    tmps.append(ave_t)

target = getNearestValue(tmps,a)
print(tmps.index(target) + 1)

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

ans=0
cnt=10000
TEMP=0.006

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    t, a = list(map(int, input().rstrip('\n').split()))
    h = list(map(int, input().rstrip('\n').split()))
    tn = 0
    ma = 10 ** 10
    for i in range(n):
        tt = abs(t - (h[i] * 0.006) - a)
        if ma > tt:
            ma = tt
            tn = i + 1
    print(tn)


if __name__ == '__main__':
    slove()

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

ts = []
for sh in h:
    ts.append(t - 0.006 * sh)

sabun  = 1000000000000
res = 0
for i in range(n):
    if abs(ts[i]-a) < sabun:
        sabun = abs(ts[i]-a)
        res = i+1

print(res)

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

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

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

l=[]

for i in range(n):
  l.append((t-h[i]*0.006-a)**2)
m=min(l)
for i in range(n):
  if l[i]==m:
    print(i+1)

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

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

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

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans = -1
dif = 100000000.0
for i in range(N):
    if abs(T-H[i]*0.006- A) < dif:
        dif = abs(T-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()))

k = abs(a- (t - h[0] * 0.006))
candidate = 0
for i in range(n):
    avg_tmp = t - h[i] * 0.006
  
    if k >= abs(a - avg_tmp):
        candidate = i + 1
        k = abs(a - avg_tmp)

print(candidate)

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

Solution (Python):
from fractions import gcd
import sys
input = sys.stdin.readline


def main():
    n = int(input())
    t, a = map(int, input().split())
    H = list(map(int, input().split()))

    d_min = float('inf')
    ans = 0
    for i in range(n):
        d = abs(a - (t - H[i]*0.006))
        if d<d_min:
            d_min = d
            ans = i+1
    
    print(ans)
    

 
if __name__ == '__main__':
    main()

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

conf =1000000000
cnt = 0
for i in H:
    if conf > abs(A -(T-i*0.006)):
        conf = abs(A -(T-i*0.006))
        cnt = i
        
print(H.index(cnt)+1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ind = 0
min_val = 10000000
for i in range(N):
	_ = abs(A - (T - H[i] * 0.006))
	if min_val > _:
		min_val = _
		ind = i + 1
print(ind)

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *

from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N = int(input())
    T,A = map(int, input().split())
    HS = list(map(int, input().split()))
    temps = [T-h*0.006 for h in HS]

    ans = 0
    tmp = float('inf')
    for idx, temp in enumerate(temps):
        if abs(A-temp) < tmp:
            ans = idx+1
            tmp = abs(A-temp)
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
D=[abs(T-i*0.006-A) for i 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()))
TA=10**5+1
for i in range(n):
    if TA>abs(a-t+h[i]*0.006):
        ans=i+1
        TA=abs(a-t+h[i]*0.006)
 
print(ans)

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

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

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

for x in h:
    heat = abs(a - (t - x*0.006))
    locate.append(heat)

near_t = min(locate)
print(locate.index(near_t)+1)

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

print(p + 1)

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

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    t, a = map(int, input().split())
    print(
        min(
            [
                [i, t - h * 0.006]
                for i, h in enumerate(map(int, input().split()), start=1)
            ],
            key=lambda x: abs(x[1] - a),
        )[0]
    )


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
t,a = map(int, input().split())
h =[int(_) for _ in input().split()]
ans =[]
for i in range(n):
  tem = t-(h[i]*0.006)
  temp=abs(a-tem)
  ans.append([temp,i+1])
print(min(ans)[1])

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

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

ans=[]
for i, name in enumerate(h):
    ans.append([i+1, abs((t-name*0.006)-a)])
ans.sort(key=lambda x: x[1])
print(ans[0][0])

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

print(ans)

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

mini = 10**5+1
for i in range(N):
    if mini > abs(A-T+H[i]*0.006):
        mini = abs(A-T+H[i]*0.006)
        ans = i+1
print(ans)

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

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

res = abs(a - (t - h[0] * 0.006))
ans = 1
for i in range(len(h)):
    x = h[i]
    res_n = abs(a - (t - x * 0.006))
    
    if res > res_n:
        res = res_n
        ans = i + 1

print(ans)

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

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

sa = 10000
ans = 0
for i in range(n):
      tem = t - (L[i] * 0.006)
      if sa > abs(a - tem):
            sa = abs(a - tem)
            ans = i + 1      

print(ans)

Solution (Python):


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

DOWN_RATE = 0.006
INF_TEMP = 50 + 100000 * DOWN_RATE

betterTemp = INF_TEMP
betterPlace = 0
for i in range(n):
    tempTemp = t - (h[i] * DOWN_RATE)
    tempDiff = abs(a-tempTemp)
    if tempDiff <= betterTemp:
        betterTemp = tempDiff
        betterPlace = i

print betterPlace + 1

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

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

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

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

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

for i in range(n):
    T.append(t-h[i]*0.006)

P=[]
for i in range(n):
    P.append(abs(T[i]-a))

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

Solution (Python):


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

dp = []
for i in range(n):
    dp.append(abs(a-(t-h[i]*0.006)))


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

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

n = int(input())

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

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

'''
T - li[] * 0.006 = A が一番近いもの
'''

p = abs(t - li[0] * 0.006 - a) 
q = 0
s = 0

for i in li:

    b = abs(t - int(i) * 0.006 - a)

    if b < p :
        p = b
        s = q

    q = q + 1

print(s + 1)

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

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

ave = []
for hi in list(map(int, input().split())):
  ave.append(abs(a - (t - hi * 0.006)))
print(ave.index(min(ave)) + 1)

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

ave = []
for hi in list(map(int, input().split())):
  tmp = t - hi * 0.006
  ave.append(abs(a - tmp))
print(ave.index(min(ave)) + 1)

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

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

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=list(map(lambda x: abs(A-T+x*0.006), list(map(int,input().split()))))
print(H.index(min(H))+1)

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

t_list = [t - h * 0.006 for h in h_list]
diff = 10000
point = 0

for i, temp in enumerate(t_list):
    d = abs(a-temp)
    if d < diff:
        diff = d
        point = i+1

print(point)

Solution (Python):
N=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
l=[]
for h in H:
    l.append(abs(a-t+h*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()))
tem = []
for i in range(n):
    tem1 = t-h[i]*0.006
    tem1 = abs(tem1-a)
    tem.append([tem1, i+1])
tem.sort()
print(tem[0][1])

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

temp_diff = 10**10
ans = 0

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

print(ans)

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

print(min(range(n), key=lambda x: abs(t - h[x] * 0.006 - a)) + 1)

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

temp=[abs(A-(T-H[i]*0.006)) for i in range(N)]
print(np.argmin(temp)+1)

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

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

tempurature = []

for i in height:
    n = T - (i * 0.006)
    tempurature.append(abs(A - n))

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

Solution (Python):
n=int(input())
t,a= map(int,input().split())
h = list(map(int,input().split()))
m=abs(t-h[0]*0.006-a)
ans=0
for i in range(n):
    if m >= abs(t-h[i]*0.006-a):
        m=abs(t-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()))
z = [abs(A - (T - h*0.006)) for h in H]
print( z.index(min(z)) +1 )

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

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

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

Solution (Python):
from operator import itemgetter

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

for i, x in enumerate(h, 1):
    avg = t - x * 0.006
    delta = abs(a - avg)
    deltas.append((i,delta))
answer = min(deltas, key=itemgetter(1))[0]
print(answer)

Solution (Python):
N = int(input())
T, A = list(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):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
def avetem(x):
  return T-x*0.006
B = []
for i in range(N):
  B.append(abs(A-avetem(H[i])))
print((B.index(min(B))+1))

Solution (Python):
n = int(input())
t, a = [int(_) for _ in input().split()]
h = list(map(int, input().split()))
tmp = 10e9
output = 0

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

print(output)

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

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

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

answer = [0]
min = abs(t - 0.006 * max(h) - a) 
for i in range(len(h)):
  if abs(t - 0.006*h[i] -a) <= min:
    min = abs(t - 0.006 * h[i] -a)
    answer.remove(answer[0])
    answer.append(i)
print(answer[0]+1)

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

min_v = 10 ** 10
index = 0
for i in range(N):
    diff = abs((T - H[i] * 0.006) - A)
    if diff < min_v:
        min_v = diff
        index = i + 1


print(index)

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    T, A = map(int, input().split())
    H = list(map(int, input().split()))
    diff_min = 10**6
    best = 0
    for i in range(N):
        if diff_min > abs(T - 0.006*H[i] - A):
            diff_min = abs(T - 0.006*H[i] - A)
            best = i + 1
    print(best)

Solution (Python):
n = int(input())
t,a = [int(i) for i in input().split()]
h =[int(x) for x in input().split()]
for i in range(len(h)):
  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()))
cmin = 10**6
for i in range(N):
    t = T-H[i]*0.006
    if abs(A-t)<cmin:
        cmin = abs(A-t)
        ind = i+1
print(ind)

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

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

Solution (Python):
import math
n = int(input())
t, a = map(int,input().split())
src = list(map(int,input().split()))
new = []
for s in src:
    new.append(math.fabs(t-s*0.006-a))
print(new.index(min(new))+1)

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

diff = [0] * n

for i in range(0, n):
    diff[i] = abs(a - (t - nums[i] * 0.006))

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

Solution (Python):


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


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


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

Solution (Python):
n = int(input())
t,a = map(int, input().split())
H = [int(x) for x in input().split()]
ans, ans_abs = -1, float('inf')
H=[(i+1,t-h*0.006) for i,h in enumerate(H)]

for i,h in H:
  if ans_abs > abs(a-h):
    ans =i
    ans_abs = abs(a-h)
print(ans)

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

ans, ans_abs = -1, float("inf")
H = [(i+1, T - h*0.006) for i, h in enumerate(H)]
for i, h in H:
    if ans_abs > abs(A - h):
        ans = i
        ans_abs = abs(A - h)
print(ans)