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):
def calc_temp(x,T):
    return T - x * 0.006

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

near_temp = 1000

for i in range(N):
    if abs(A - calc_temp(H_list[i],T)) <= abs(A - near_temp):
        near_temp = calc_temp(H_list[i],T)
        num = i+1

print(num)

Solution (Python):

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

near = float("inf")
num = 0

for i in h:
    x = t - i*decimal.Decimal("0.006")
    if near > abs(a-x):
        near = abs(a-x)
        num = i
        
print(h.index(num)+1)

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

INF = 10**5
temp = INF

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

print(ans)

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]*6/1000)))
print(l.index(min(l))+1)

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

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
(*h,) = map(int, input().split())
x = (t - a) * 1000 // 6
h_min = 10 ** 5
for i in range(n):
    if abs(h[i] - x) < h_min:
        h_min = abs(h[i] - x)
        ans = i
print(ans + 1)

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

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

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

answers = []
for h in hn:
  answers.append(abs(a-(t-h*0.006)))
  
print(answers.index(min(answers))+1)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

ans = 1
pre = abs(a * 1000 - (t * 1000 - h[0] * 6))
for i in range(1, n):
    tmp = (t * 1000 - h[i] * 6)
    tmp = abs(a * 1000 - tmp)
    if tmp < pre:
        pre = tmp
        ans = i + 1
print(ans)

Solution (Python):
import numpy as np

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

temperatures = list(abs([T]*N - H*0.006 - [A]*N))

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

Solution (Python):

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

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

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

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

tmp_lists = [(t - i*0.006) for i in lists]
diff_lists = []
for i in tmp_lists:
  diff_lists.append(a-i if (a-i) >=0 else (a-i)* -1)
copy = diff_lists.copy()
copy.sort()
index = diff_lists.index(copy[0])
print(index+1)

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

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

    d = 10000000
    ans = 0
    for i, h in enumerate(H):
        if abs(T - 0.006*h - A) < d:
            d = abs(T - 0.006*h - A)
            ans = i+1
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline  
N = int(input())
T,A = (int(i) for i in input().split())
H = list(map(int, input().split()))




dif =[100]*N
for i in range(N):
    T_H =T -H[i] *0.006
    dif[i] =abs(T_H -A)

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

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

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

Solution (Python):
N = int(input())
T,A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
m = -float("inf")
p = -1
for i,h in enumerate(H,1):
    t = T - (h * 6 / 1000)
    if abs(A - t) < abs(A - m):
        m = t
        p = i
print(p)

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

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

print(spot+1)

Solution (Python):
from fractions import Fraction
N,T,A,*HH = map(Fraction, open(0).read().split())
print(int(min(enumerate(HH), key=lambda x:abs(T-x[1]*Fraction('0.006')-A))[0]+1))

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

for n in range(N):
  C = T-H[n]*0.006
  if dif > abs(A-C):
    dif = abs(A-C)
    num = n+1
    
print(num)

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
temp = [abs(T-h*0.006 - A) for h in H]
ans = 0
mint = 10**20
for i, t in enumerate(temp):
  if mint > t:
    mint = t
    ans = i+1
print(ans)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
H_temp = [None] * len(H)

for i in range(len(H)):
    H_temp[i] = (abs((T - 0.006 * H[i]) - A), i+1)

H_temp.sort()
print(int(H_temp[0][1]))

Solution (Python):
n = int(input())
t, a = map(int, input().split(" "))
h = list(map(int, input().split(" ")))
avg_list = []
res = 0
for i in range(0, n):
    avg = t - h[i] * 0.006 - a
    if avg < 0:
        avg = -avg
    avg_list.append(avg)
print(avg_list.index(min(avg_list)) + 1)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
near_A = 1e8
for i, H in enumerate(map(int, input().split())):
  ave_tem = T - H * 0.006
  if near_A > abs(ave_tem - A):
    near_A = abs(ave_tem - A)
    res = i + 1
print(res)

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

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
res = 10 ** 6
idx = 0
for i, h in enumerate(H):
    tmp = abs(A - T + h * 0.006)
    if tmp < res:
        res = tmp
        idx = i + 1
print(idx)

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

val = abs(a - t + h[0] * 0.006)
ans = 1

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

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

diff = [0] * n
for i in range(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 = list(map(int,input().split()))
ans = 10**6
te = 0
I = int()
for i in range(N):
    te = T-H[i]*0.006
    if abs(A-te) < ans:
        ans = abs(A-te)
        I = i
print(I+1)

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

Solution (Python):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
d = {}
for x in H:
    d[x] = abs(A-(T-x*0.006))
counter = 1
counter_x = 1
min_ = 100000
for i in d.values():
    if(min_>=i):
        min_ = i
        counter_x = counter
    counter += 1
print(counter_x)

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

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

min = max(array_hight)
point = ''
for I in array_hight:
    if abs(A - (T - (I * 0.006))) < min:
        min = abs(A - (T - (I * 0.006)))
        point = array_hight.index(I)
print(int(point)+1)

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

def TEMP(H):
    return T - H*0.006

def AAA(H):
    return abs(A - H)

H = list(map(TEMP, H))

H = list(map(AAA, H))

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

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

def getTemperature(H):
  return T - H * 0.006

def adjustAbs(H):
  if H > A:
    return abs(H - A)
  else:
    return abs(A - H)

H = list(map(getTemperature, H))

H = list(map(adjustAbs, H))

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
lst = []
for i in range(N):
    tmp = abs(A-(T - H[i] * 0.006))
    lst.append(tmp)

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

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

inf = float('inf')
closest = inf
closest_i = inf
for i, v in enumerate(h):
    if abs(a - (t - 0.006*v)) < closest:
        closest = abs(a - (t - 0.006*v))
        closest_i = i + 1
print(closest_i)

Solution (Python):

n, t, a, *h = map(int, open(0).read().split())
x = (t - a) * 1000 / 6
h = [abs(x - i) for i in h]
print(h.index(min(h)) + 1)

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

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

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

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

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

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


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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
h = [abs(A-T+0.006*x) for x 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()))

o = (t-a)/0.006 
l = [abs(i-o) for i in h]
ans = l.index(min(l)) + 1
print(ans)

Solution (Python):
n = int(input())
t,a = map(int, input().split())
dat = list(map(int, input().split()))
resind = -1
resval = 9999999999999999999999999
for i in range(n):
    x = t - dat[i] * 0.006
    diff = abs(x-a)
    if diff < resval:
        resval = diff
        resind = i
print(resind+1)

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

ans = 99999999
ansplace = 0
for cnt, i in enumerate(h):
	if ans > abs(t-i*0.006-a):
		ans = abs(t-i*0.006-a)
		ansplace = cnt
print(ansplace+1)

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

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
t, a = rm()
ansv = inf
ansi = 0
for i, v in enumerate(rl()):
  if abs(a-t+v*0.006) < ansv:
    ansv = abs(a-t+v*0.006)
    ansi = i+1
print(ansi)

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

Solution (Python):

n = int(raw_input())
t,a = map(int, raw_input().split(' '))
his = map(int, raw_input().split(' '))
m = (+float('inf'),-1)
for i,hi in enumerate(his): m = min(m, (abs(t - hi * 0.006 - a),i+1))
print  m[1]

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

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
m = 1 
mindis = abs(A-(T-H[0]*0.006))
for i in range(1,N):
  cd = abs(A-(T-H[i]*0.006))
  if mindis > cd:
    m = i+1
    mindis = cd
print(m)

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

ans = 0
s = float("inf")
for i in range(n):
  if abs(a - (t-h[i]*0.006)) < s:
    s = 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()))

ans = 0
ansc = 999999

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

print(ans)

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()
t,a = i2()
h = intl()

ans = 0
min = 10000
for i in range(n):
	if abs(t - 0.006*h[i] - a) < min:
		min = abs(t - 0.006*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()))
best = 1000.0
point = 0
ans = 0
for i in range(N):
    ans = abs(A - (T - H[i]*0.006))
    if best > ans:
        best = ans
        point = i + 1
print(point)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
minn=10**10
for i in range(n):
  if minn>abs((t*(1000)-6*H[i])-a*1000):
    ans = i
    minn=abs((t*(1000)-6*H[i])-a*1000)
print(ans+1)

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

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

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

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

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


M=10**10
X=0
for i in range(1,N+1):
    B=abs(1000*(T-A)-6*H[i])
    if B<=M:
        M=B
        X=i
print(X)

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

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


a_list=[abs(a-(t-i*0.006)) for i in h_list]

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

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

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

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

dic = []
for i in h:
  b = abs(a - (t - i * 0.006))
  dic.append(b)

print(dic.index(min(dic)) + 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):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))

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

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

ans = []
for h in H:
    ans.append(abs((T-h*0.006)-A))

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

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(A - (T - H[i]*0.006))

print(H.index(min(H))+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 idx


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

temp = []

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

print(getNearestValue(temp,a) + 1)

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

ans = 1000000
cnt = 0
T = [0 for i in range(n)]

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

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

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

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

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

diff_list = []
for h in H:
    diff = abs(A - (T - h * 0.006))
    diff_list.append(diff)

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

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

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

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

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

print(ansnum)

Solution (Python):
import numpy as np

n = int(input())
t, a = map(float, input().split())
h = np.array([float(x) for x in input().split()])

dif = np.abs(a - (t - 0.006 * h))
print(np.argmin(dif) + 1)

Solution (Python):
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]
    m = (-1, 10**3)
    for i,v in enumerate(temp):
        d = abs(a-v)
        if m[1] >= d:
            m = (i, d)
    print(m[0]+1)
        
if __name__ == "__main__":
    main()

Solution (Python):
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

N = INT()
T, A = MI()
H = list(map(lambda x : T - 0.006 * int(x), input().split()))

for i in range(N):
    H[i] = abs(H[i] - A)
    
ans = H.index(min(H)) + 1

print(ans)

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
listh = list(map(int, input().split()))
temp = 100000
index = 0

for i in range(n):
    diff = abs((t - listh[i] * 0.006)-a)
    if temp > diff:
        temp = diff
        index = i+1

print(index)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
listh = list(map(int, input().split()))
temp = 100000
index = 0

for i in range(n):
    c = t - listh[i] * 0.006
    diff = abs(c-a)
    if temp > diff:
        temp = diff
        index = i+1

print(index)

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

temp = []

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

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


resolve()

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

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






min_a_tono_sa = 999999
index = 0
for i in range(len(h_l)):
    h = h_l[i]
    heikin_kion = t - h * 0.006
    
    a_tono_sa = abs(a - heikin_kion)
    
    
    if min_a_tono_sa > a_tono_sa:
        min_a_tono_sa = a_tono_sa
        index = i + 1
        
print(index)

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

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

cand = float('inf')
ans = 1

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

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

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


print(k)

Solution (Python):
def solve():
    n = int(input())
    t, a = map(int, input().split())
    h = list(map(int, input().split()))
    c = 10000
    ci = 0
    for i, x in enumerate(h):
        tmp = abs(a - (t - x * 0.006))
        if c > tmp:
            c = tmp
            ci = i
    print(ci + 1)

if __name__ == '__main__':
    solve()

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

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

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

def htemp(h):
    return abs(a - ((t * 1000) - (h * 6)) / 1000)

ans = list(map(htemp, h))
ans1 = ans.index(min(ans)) + 1

print(ans1)

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

Solution (Python):

n = int(input())


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

o = []

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


p = abs(a - o[0])

q = 0
for i in range(n)[1:]:
    if abs(a - o[i]) < p:
        p = abs(a - o[i])
        q = i

print(q + 1)

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

print(sorted([(abs(A - (T - h * 0.006)), i+1) for i,h in enumerate(H)])[0][1])

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

near = sys.maxsize
ans = 0

for i in range(n):
  if abs(a - (t-h[i]*0.006)) < near:
    ans = i+1
    near = 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()))
ABS = []
for i in H:
    ABS.append(abs((t-i*0.006) - a))
print(ABS.index(min(ABS)) + 1)

Solution (Python):


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

h = [t-i*0.006 for i in h]


diff = 10**6
index = 0
for i, j in enumerate(h):
    if diff > abs(j-a):
        diff = abs(j-a)
        index = i+1
print(index)

Solution (Python):

n, t, a, *h = map(int, open(0).read().split())
h = list(map(lambda x: abs(a-(t-x*0.006)), h))
a = list(enumerate(h))
a.sort(key=lambda x: x[1])
print(a[0][0]+1)

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
T, A = mapint()
Hs = list(mapint())
ths = [(abs(A-(T-(x*0.006))), i+1) for i, x in enumerate(Hs)]
ths.sort()

print(ths[0][1])

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

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

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

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

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

def calc_tem(H):
    return abs(A - ((T*1000) - (H*6)) / 1000)

new_lis = list(map(calc_tem, lis))
ans = new_lis.index(min(new_lis)) + 1

print(ans)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
x=list(map(int,input().split()))
ans=0
cnt=10**3
for i in range(len(x)):
  s=t-x[i]*0.006
  if abs(s-a)<cnt:
    cnt=abs(s-a)
    ans=i+1
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(a - (t - h[i] * 0.006))

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
check=10**9
for i in range(N):
  ondo=T-H[i]*0.006
  temp_val=abs(A-ondo)
  if temp_val<check:
    check=temp_val
    ans=i+1
print(ans)

Solution (Python):
N = int(input())
T, A = map(int, input().split())
H = map(int, input().split())
scores = {}
for i, h in enumerate(H, 1):
    scores[i] = abs (A - (T - h * 0.006))
print(min(scores, key=scores.get))

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

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

HT = []

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

Solution (Python):
n, t, a, *h = map(int, open(0).read().split())
ans = 0
diff_a = float('inf')
for i in range(n):
    if diff_a > abs(a - (t - h[i] * 0.006)):
        ans = i+1
        diff_a = abs(a - (t - h[i] * 0.006))
print(ans)

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

temp = list(map(lambda x: abs(A - (T - x*0.006)), H))
print(temp.index(min(temp))+1)