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):
from sys import stdin

N = int(stdin.readline().rstrip())
[T, A] = list(map(int, stdin.readline().rstrip().split()))
H = list(map(int, stdin.readline().rstrip().split()))



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

def difference(a, t):
    return max(a, t) - min(a, t)

nearest_point = 0
nearest_diff = 1000000

for i in range(N):
    t = temp(T, H[i])
    diff = difference(A, t)

    if nearest_diff > diff:
        nearest_point = i
        nearest_diff = diff

print(nearest_point+1)

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

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

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

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

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



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


for k in range(N):
    H[k] = abs(H[k] - (A))


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

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

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

min_val = 100000
min_num=0
for i in range(len(a)):
    d = abs(T-0.006*a[i]-A)
    if d < min_val:
        min_val = d
        min_num = i
print(min_num+1)

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

Solution (Python):


def solve():
    N = int(input())
    T, A = map(int, input().split())
    Hlist = list(map(int, input().split()))

    templist = []

    for i in range(N):
        templist.append(abs((T-Hlist[i]*0.006)-A))

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


if __name__ == "__main__":
    solve()

Solution (Python):

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

x = 100000
ans = 0

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

print(ans+1)

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


if __name__ == '__main__':
    main()

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

temperture_li = [abs(a-(t-h_inputs[i]*0.006)) for i in range(n)]
ans = temperture_li.index(min(temperture_li))

print(ans+1)

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
palace = []
for i in range(1, n+1):
    candidate =[]
    temperature =abs(a -(t - h[i-1] *0.006))
    candidate.append(temperature)
    candidate.append(i)
    palace.append(candidate)
sort_palace = sorted(palace)
print(sort_palace[0][1])

Solution (Python):









import numpy as np






N = int(input())
T,A = map(int,input().split())
arrH = np.array(input().split(),dtype=np.float64)

arrH = abs((arrH*-0.006 + T)-A)
ans = np.argmin(arrH)+1
print(ans)

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

mtd=float('inf')
ans=0

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

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

t_list = []

for i in range(N):
    t_list.append(T-H[i]*0.006)

max = 0
for i in range(N):
    if abs(A-t_list[max]) > abs(A-t_list[i]):
        max = i
        
print(max+1)

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

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

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

temperature = [abs(a - (t-i*0.006)) for i in h]

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

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

Solution (Python):
N = int(input())
T, A = list(map(int,input().split()))
hlist1 = list(map(int,input().split()))
kion_min = 10000000
titen = -10

for i in range(N):
  kion1 = abs(T-0.006*hlist1[i]-A)
  if kion1 < kion_min:
    kion_min = kion1
    titen = i+1

print(titen)

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

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

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

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

min_temp = 10000000
ans = -1
for i in range(n):
    if min_temp > h[i]:
        min_temp = h[i]
        ans = i+1

print(ans)

Solution (Python):

from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product
import math


N = int(input())
s = input().split()
p = [int(w) for w in s]
T = p[0]
A = p[1]

t = input().split()
H = [int(w) for w in t]
min_diff = 10000
index = -1
for i in range(N):
    difference = abs(  (T - H[i] * 0.006)     - A)
    if(difference < min_diff):
        min_diff = difference
        index = i

print(index+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)
ans = 1

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

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

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

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

for i in range(N):
 
 
	m=float(H[i])
	a=T-0.006*m
	if abs(A-a)<x:
		x=abs(A-a)
		y=i+1
	
print(y)

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

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

h = [  abs(a - (t - i*.006)) for i in h]

mins = h[0]
index = 0
for i in range(1, n):
  if h[i] < mins:
    mins = h[i]
    index = i
    
print((index+1))

Solution (Python):
n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
ans = float('inf')
for h in H:
  if abs(a-(t-ans*0.006)) > abs(a-(t-h*0.006)):
    ans = h
print(H.index(ans)+1)

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

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

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

MIN = 10000
ans = 10000

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

print(ans+1)

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

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

import copy
t = copy.copy(H)
m = 100000
ans = 0
for i in range(N):
    t[i] = abs(T-0.006*H[i]-A)
    if t[i]<m:
        m = t[i]
        ans = i+1
print(ans)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
*h, = map(int, input().split())
def f(x): return abs(t - x*0.006 - a)
print(h.index(min(h, key=f))+1)

Solution (Python):

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

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

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

Solution (Python):
n = int(input())
t,a = map(int,input().split(' '))
H = list(map(int, input().split(' ')))
d_min = abs(a - (t - H[0]*0.006))
ans = 0
i = 1
while i < n:
    if abs(a - (t-H[i]*0.006)) < d_min:
        d_min = abs(a - (t-H[i]*0.006))
        ans = i
    i += 1
print(ans+1)

Solution (Python):

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

diff = [abs(T - h * 0.006 - A) for h in H]
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 = 0
near_a = 1000000
for i in range(N):
    temp = T - H[i] *0.006
    if near_a > abs(A - temp):
        near_a = abs(A - temp)
        ans = i + 1
print(ans)

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

Solution (Python):
def main():
    N = int(input())
    T, A = map(int, input().split())
    H = [int(a) for a in input().split()]
    dmin = 10**9
    ind = 0
    for i in range(N):
        t = T - H[i] * 0.006
        d = abs(t - A)
        if d < dmin:
            dmin = d
            ind = i
    print(ind+1)
main()

Solution (Python):


data = int(input())
n,m = map(int, input().split())
k = map(int, input().split())
j = [abs(m-(n-i*0.006)) for i in k]
print(j.index(min(j)) + 1)

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

for i in range(n):
    if diff > abs(a - (t - h[i]*0.006)):
        diff = 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()))
dif=10**7

for i in range(N):
    if abs(A-(T-0.006*h[i]))<=dif:
        t=i
        dif=abs(A-(T-0.006*h[i]))
print(t+1)

Solution (Python):
n=int(input())
t,a=map(int,input().split())
h=[0]*n
h=list(map(int,input().split()))
for i in range(n):
  h[i]=abs(t-0.006*float(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 = []
for i in range(0,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()))
temp = []
for i in range(n):
  temp.append(a-(t-H[i]*0.006))
temp_abs = [abs(j) for j in temp]
mini_temp_abs = min(temp_abs)
for k in range(n):
  if temp_abs[k] == mini_temp_abs:
    print(k+1)

Solution (Python):
def myAnswer(N:int,T:int,A:int,H:list) -> int:
   ans = 0
   s = 10**10
   for n,x in enumerate(H):
      tmp = T - x * 0.006
      if(s >= abs(A - tmp)):
         ans = n+1
         s = abs(A - tmp)
   return ans


def modelAnswer():
   tmp=1
def main():
   N = int(input())
   T,A = map(int,input().split())
   H = list(map(int,input().split()))
   print(myAnswer(N,T,A,H[:]))

if __name__ == '__main__':
   main()

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

Solution (Python):
N=int(input())
T,A=map(int,input().split())
H=[int(i) for i in input().split()]
MIN=10000
num=0
for s in H:
    if (abs(A-(T-(s*0.006))))<MIN:
        MIN=(abs(A-(T-(s*0.006))))
        num=(H.index(s)+1)
    else:
        continue
print(num)

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

Solution (Python):
n = int(input())
t,a = map(int, input().split())
data = list(map(int, input().split())) 
degree = 1000000
for i,x in enumerate(data):
    temp = t - 0.006*x
    if degree > abs(temp-a):
        degree = abs(temp-a)
        num = i+1
print(num)

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

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

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

ans = [float("inf"), -1]
for i in range(len(H)):
    if abs(T - H[i]*0.006 - A) < ans[0]:
        ans[0] = abs(T - H[i]*0.006 - A)
        ans[1] = i+1

print(ans[1])

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

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

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

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

temp_now = 0
temp_ans = 999999999
ans = 0

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

print(ans)

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

h = list(map(int, input().split()))
for i in range(1,n+1):
  x = t - (h[i-1] * 0.006)

  if y ==0:
    y=x
    z=i
  else:
    if abs(x-a) <= abs(y-a):
      y = x
      z = i
print(z)

Solution (Python):
import numpy as np
def Palace(n , t , a , hli):

    ans = 0
    count = 10**8

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

    return ans

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

if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
_, t, a, *h = map(int, open(0).read().split())
print(sorted(map(lambda x: (x[0], abs(t - x[1]*.006 - a)), enumerate(h)), key = lambda y: y[1])[0][0]+1)

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

idx = 0
best = 10e9
for i, h in enumerate(H):
    t = T - h * 0.006
    res = abs(A - t)
    if (best > res):
        best = res
        idx = i + 1

print(idx)

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

rT = T - (H[0]*0.006)
dif = abs(A - rT)
ans = 1

for i in range(1, N):
    rTi = T - (H[i]*0.006)
    e_dif = abs(A - rTi)
    if e_dif<dif:
        dif = e_dif
        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()))

a =0
h = len(H)
b =[]

for i in range(h):
    a = A - (T - H[i]*(0.006))
    if a >= 0:
        b.append(a)
    else:
        b.append(-a)

c = min(b)

print(b.index(c)+1)

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
temp = 10 ** 6
ans = 0
height = list(map(int, input().split()))
for i, h in enumerate(height):
    diff = abs(a - (t - h * 0.006))
    if temp > diff:
        temp = diff
        ans = i + 1
print(ans)

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

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

min = 10000

def func(h):
    return t - h*0.006

for i, height in enumerate(h):
    temperature = func(height)
    diff = abs(temperature-a)
    if min > diff:
        ans = i+1
        min = diff

print(ans)

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

ans, tmp = 0, 10000000
for i in range(n):
    if abs(a - (t - h[i] * 0.006)) < tmp:
        tmp = abs(a - (t - h[i] * 0.006))
        ans = i

print(ans + 1)

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

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

temp_dif = np.zeros(N)
for i in range(N):
  temp_dif[i] = abs ( (T - H[i] * 0.006) - A )
ind=np.where(temp_dif==min(temp_dif))
print(ind[0][0]+1)

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

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

rT = T - (H[0]*0.006)
dif = abs(A - rT)
ans = 1

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

print(ans)

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
t,a = iim()
H = iil()
mdif = 10**9
ans = 0
for i,item in enumerate(H):
    tem = t - item*0.006
    if abs(tem - a) < mdif:
        ans = i+1
        mdif = abs(tem - a)
print(ans)

Solution (Python):
import numpy as np

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

ave = T-H*0.006
dif = abs(ave - A)

print(np.where(min(dif) == dif)[0][0]+1)

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

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

print(min(dic,key=dic.get))

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    T, A = il()
    H = il()
    S = []

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    n = II(); t, a = MII(); hh = MII()
    d = [(i+1, abs(a-(t-h*0.006))) for i,h in enumerate((hh))]
    d.sort(key=lambda x: x[1])
    print(d[0][0])

if __name__ == '__main__':
    main()

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    n = II()
    t, a = MII()
    hh = MII()
    d = []
    for i, h in enumerate(hh):
        d.append((i+1, abs(a - (t - h*0.006))))
    d.sort(key=lambda x: x[1])
    print(d[0][0])

if __name__ == '__main__':
    main()

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)

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

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

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

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

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

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

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

Solution (Python):
def main():
  n = int(input())
  
  
  t,a = list(map(int,input().split()))
  h = list(map(int,input().split()))
  
  
  
  
  ans = t - h[0]*0.006
  count = 1
  lis = []
  
  for i in range(1,len(h)):
    hi = t - h[i]*0.006
    if abs(a - hi) < abs(a - ans):
      ans = hi
      count = i + 1
  print(count)
  
if __name__ == '__main__':
  main()

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

Solution (Python):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
ans = -1.0
d = 1e100
for i,j in enumerate(h):
  if abs(t - j*0.006 - a) < d:
    ans = i+1
    d = abs(t - j*0.006 - a)
print(ans)

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

Solution (Python):
a = int(input())
p,q= input().split()
b,c =(int(p), int(q))
d = input().split()
ans_list = []
for i in range(a):
    e = abs(c+0.006 * int(d[i])-b)
    ans_list.append(e)
for i in range(a):
    if ans_list[i] == min(ans_list):
        print(i+1)
        break

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

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

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

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

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

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

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

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

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

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

res = 1e+9
c = 0
for i in range(N):
    t = T - H[i] * 0.006
    tmp = abs(t - A)
    if res > tmp:
        res = tmp
        c = i
print(c+1)

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

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

Solution (Python):
N = int(input())
T, A = map(int, input().split())
h = list(map(int, input().split()))
t = [abs(T - i*0.006-A) for i in h]
print(t.index(min(t)) + 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 = input()
T,A = map(int,input().split())
H = list(map(int,input().split()))

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

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

Solution (Python):
n=int(input().rstrip())
data=input().rstrip().split()
t=int(data[0])
a=int(data[1])
h=input().rstrip().split()
deg=[abs((t-int(x)*0.006)-a) for x in h]
for i in range(len(deg)):
  if min(deg)==deg[i]:
    print(i+1)
    break

Solution (Python):
import numpy as np

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

T_list = [abs(t-0.006*H[i]-a) for i in range(n)]
print(np.argmin(T_list) + 1)

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

Solution (Python):

N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans = -1
ans_diff = 10**19

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

print(ans+1)