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

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

s = 100000
ansi = 0
for i in range(0, n):
    tm = t - h[i] * 0.006
    if s > abs(a-tm):
        s = abs(a-tm)
        ansi = i

print(ansi+1)

Solution (Python):
def difftemp_with_a(height_i):
    return abs((t - height_i * 0.006) - a)

n = int(input())
t, a = [int(x) for x in input().split()]
height = [int(x) for x in input().split()]
print(height.index(min(height, key = difftemp_with_a)) + 1)

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

for i in h:
    s.append(abs(a-t+i*0.006))

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

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

for i in h:
    s.append(abs(t-i*0.006-a))

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

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


n = II()
t, a = LI()
H = LI()

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

print(ans)

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

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

H2 = []

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

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

Solution (Python):
N = int(input())
t,a = map(int,input().split())
high = list(map(int,input().split()))
def temp(h):
    return t - h*0.006

ans = 0
min = 10**10
for i in range(N):
    if min > abs(a-temp(high[i])):
        ans = i
        min = abs(a-temp(high[i]))
print(ans+1)

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

Solution (Python):
N = int(input())
T,A = list(map(int,input().split()))
H = list(map(int,input().split()))
ans = 0
tempans = 0
for i in range(len(H)):
    tem = T - 0.006*(H[i])
    a = abs(A-tem)

    if i == 0:
        ans = i+1
        tempans = a
    elif a < tempans:
        ans = i+1
        tempans = a

print(ans)

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

diff = float("INF")
min_index = 0
index = 1
for h in hs:
    temp_diff = abs(a - (t - h*0.006))
    if temp_diff < diff:
        diff = temp_diff
        min_index = index
    index += 1
print(min_index)

Solution (Python):
import re
from itertools import count
from sys import stdin


def main():
    _, t, a, *hs = get_params()
    print(solve(t, a, hs))


def get_params():
    return map(int, words(get_contents()))


def words(s):
    return re.split(r'\s', s)


def get_contents():
    return stdin.read().strip()


def solve(t, a, hs):
    def temperature(h):
        return t - 0.006 * h

    def distance(t):
        return abs(t - a)

    ts = map(temperature, hs)
    ds = map(distance, ts)
    dis = zip(ds, count(1))
    return min(dis)[1]


if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    main()

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

d = 10 ** 9
ans = -1
for i in range(N):
    t = abs((1000 * T - 6 * h[i]) - 1000 * A)
    if t < d:
        ans = i + 1
        d = t
print(ans)

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

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

ans=0
min_dif = float("inf")
for i, h in enumerate(H):
  dif = abs(A-(T-h*0.006))
  if dif<min_dif:
    min_dif = dif
    ans=i

print(ans+1)

Solution (Python):

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



def dif(h):
    return abs(T - h*0.006 - A)

neari = 0
nearDif = dif(H[0])
for i in range(N):
    
    idif = dif(H[i])
    if idif<nearDif:
        neari = i
        nearDif = idif
        
print(neari+1)

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

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

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

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

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

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

ans = 1
min_tmp = 1000

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

print(ans)

Solution (Python):

import sys

n = int(input())
t, a = map(int, input().split())
H = list(map(int, input().split()))
res = [0 for _ in range(n)]


for i in range(n) :
    res[i] = t - H[i] * 0.006

result = 0
wk_abs = 0
bf_abs = 999
for i in range(n) :
    if res[i] == a :
        result = i + 1
    else :
        wk_abs = abs(a - res[i])
        if wk_abs < bf_abs :
            bf_abs = wk_abs
            result = i + 1

print (result)

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

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

x = [0 for _ in range(N)]

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

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


w = 999999
answer = 0
for i,x in enumerate(h):
    x = int(x)
    tmp = abs(A - (T - (x * 0.006)))
    if tmp < w:
        w = tmp
        answer = i+1

print(answer)

Solution (Python):
N = int(input())
l = input().split(' ')
H = input().split( )

T=int(l[0])
A = int(l[1])
H = [int(x) for x in H]

tem_gap = [abs((T-h*0.006)-A) for h in H]

min = min(tem_gap)
print(tem_gap.index(min) + 1)

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

ab=10000
titen=0

for i in range(N):
    H[i]=T-(H[i]*6/1000)
    temp=abs(H[i]-A)
    if(ab>temp):
        titen=i+1
        ab=temp
print(titen)

Solution (Python):

"""
Created on Fri Jan  4 19:46:02 2019

@author: Yamazaki Kenichi
"""

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

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


print(temp[0])

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

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

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

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

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

Solution (Python):
from math import fabs

def main():
  n = int(input())
  T, A = list(map(int, input().split()))
  H = list(map(int, input().split()))
  
  place = 0
  m = 1000000000
  for i, h in enumerate(H):
    t_h = T - h * 0.006
    dif = fabs(A - t_h)
    if dif < m:
      m = min(m, dif)
      place = i+1
  print(place)
main()

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

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

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

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

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

Solution (Python):
import bisect
N = int(input())
T, A = map(int, input().split())
H = [0]*N
H = list(map(int, input().split()))

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

ansVal = min(TL)
ans = TL.index(ansVal) + 1
print(ans)

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

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

Solution (Python):
import sys

import numpy as np

input = sys.stdin.readline
N = int(input())
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
ans = [0] * N
for i, h in enumerate(H):
    ans[i] = abs(A - T + h * 0.006)
print(np.argmin(ans) + 1)

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

mini = 0
min = float('inf')

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

print(mini)

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

P_N = [abs(T - h * 0.006 - A) for h in H_N]

palace_point = P_N.index(min(P_N)) + 1
print(palace_point)

Solution (Python):
n = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans_num = 0
ans_val = T - H[ans_num] * 0.006 - A
if ans_val < 0:
    ans_val *= -1
for i in range(1, len(H)):
    tmp = T - H[i] * 0.006 - A
    if tmp < 0:
        tmp *= -1
    if tmp < ans_val:
        ans_val = tmp
        ans_num = i
print(ans_num + 1)

Solution (Python):
_ = int(input())
T, A = map(int, input().split())
lst = [abs(A - (T - int(x) * 0.006)) for x in input().split()]
ret = 0
for idx, x in enumerate(lst):
    if lst[idx] < lst[ret]:
        ret = idx
print(ret+1)

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

li_kion = [{'index': idx + 1, 'abs': abs(a - (t - (h * 0.006)))} for idx, h in enumerate(li_h)]

print(sorted(li_kion, key=lambda x: x['abs'])[0]['index'])

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


m = abs(50-0.006*10**5)
ans = -1
for j in range(n):
    if abs(a - (t-h[j]*0.006)) < m:
        m = abs(a - (t-h[j]*0.006))
        ans = j
    else:
        pass

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()]

mini = 10000
for i, hi in enumerate(h):
    temp = t - hi * 0.006
    if abs(temp - a) < mini:
        mini = abs(temp - a)
        result = i+1

print(result)

Solution (Python):

def temperature(meter,t):
      temp = t - meter*0.006
      return temp


N = int(input())
s = input().split()
T = int(s[0])
A = float(s[1])
H = input().split()
tempera = [0]*N
for n in range(N):
    tempera[n] = temperature(int(H[n]),T)
for m in range(N):
    tempera[m] = abs(tempera[m]-A)
Min = min(tempera)
print(tempera.index(Min)+1)

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

min_dist = 1e10
min_idx = -1
for i, h in enumerate(Hs):
    avg = T - h * 0.006
    if abs(avg - A) < min_dist:
        min_dist = abs(avg - A)
        min_idx = i
print(min_idx + 1)

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

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

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

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


if __name__ == '__main__':
    main()

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

ans=0
mindif=float("inf")
i=0
for h in H:
    i+=1
    dif = abs(T-h*0.006-A)
    if dif < mindif:
        mindif = dif
        ans=i
print(ans)

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

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

Solution (Python):
N = int(input())
T, A = map(int,input().split())
H = input().split()
mindif = min(abs(1000 * T - int(H[i]) * 6 - 1000 * A) for i in range(N))

for i in range(N):
    if abs(1000 * T - int(H[i]) * 6 - 1000 * A) == mindif:
        print(i+1)
    else:
        continue

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

Ave = [0]*N
gosa = [0]*N

H = input().split()

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

print(str(int(np.argmin(np.array(gosa)))+1))

Solution (Python):
a = int(input())
b,c = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
br = []
for r in ar:
    br.append(abs(r - (((b - c) / 6) * 1000)))
print(br.index(min(br))+1)

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

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

for i in range(N):
    H[i] =  abs(A - (T-int(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 = 10000000000
for i in range(n):
    if abs(a-(t-H[i]*0.006)) < ans:
        ans = abs(a-(t-H[i]*0.006))
        final = i

print(final+1)

Solution (Python):


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


diff = 10000
for i in range(N):
    tem_diff = abs(t-h[i]*0.006-a)
    if tem_diff < diff:
        diff = tem_diff
        place = i+1


print(place)

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

Solution (Python):
place_count = int(input())
t_a = list(map(int, input().split()))

t = t_a[0]
target = t_a[1]

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

temp = []

ans = (0, 10000000)
for (idx, h) in enumerate(heights):
  temperature = t - (0.006 * h)
  if ans[1] > abs(temperature - target):
    ans = (idx + 1, abs(temperature - target))

print(ans[0])

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

diff = 10 ** 15
index = 1
ans = 10 ** 15

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


for i in input().split():
    if abs(cal(int(i))-A) <= diff:
        diff = abs(cal(int(i))-A)
        ans = index
    index += 1

print(ans)

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

print(sorted(enumerate([ abs(T - x * 0.006 - A) for x in H ]), key=lambda x: x[1])[0][0] + 1)

Solution (Python):
n = int(input())
t, a = map(int, input().split())
H = input().split()
A = []
for i in H:
    if(((t - int(i) * 0.006)-a)<0):
        A.append(-1*((t - int(i) * 0.006)-a))
    else:
        A.append((t - int(i) * 0.006)-a)
print(A.index(min(A))+1)

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

Solution (Python):
import numpy as np

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

num = np.abs(A - (T - H * 0.006))
print(np.argmin(num) + 1)

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

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

min_val = 1000
for i, x in enumerate(H):
    val = abs(A - (T - x*0.006))
    if min_val > val:
        res = i+1
        min_val = val

print(res)

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

min = abs(b[1]-b[0] - 0.006*c[0])
minn = 1

for i in range(a):
    if min > abs(b[1]-(b[0] - 0.006*c[i])):
        min = abs(b[1]-(b[0] - 0.006*c[i]))
        minn = i + 1
print(minn)

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

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

out = 10000000

for i in range(len(H)):
    now = abs( A - (T-(H[i]*0.006)))
    if out > now:
        out = now
        O = i+1

print(O)

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

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

Solution (Python):


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

    ans_num = 1
    ans_temp = T - location[0] * 0.006

    for i in range(1, num):
        temp = T - location[i] * 0.006
        if abs(A - ans_temp) > abs(A - temp):
            ans_temp = temp
            ans_num = i + 1
    print(ans_num)

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

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

def tmp(y,x):
	return y-0.006*x
min=10**6
j=0
for i in range(len(h)):
	ze=abs(a-tmp(t,h[i]))
	if min>ze:
		min=ze
		j=i

print(j+1)

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

def av_temp(t, h):
    return t - (h*0.006)

print(sorted([(i, abs(a - av_temp(t, h))) for i, h in enumerate(heights)], key=lambda x: x[1])[0][0]+1)

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

mean_temp = [abs(a - (t - x*0.006)) for x in h]

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

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

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

Solution (Python):
import numpy as np
n = int(input())
t, a = map(int, input().split())

h = list(map(int, input().split()))
results = []
for x in h:
    results.append(t - x * 0.006)

results = [abs(x - a) for x in results]
r = np.argsort(results)
print(r[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] = abs(a - (t - h[i] * 0.006))

ans = [val for val in dic.items() if val[1] == min(dic.values())]

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

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

temp_data=[T-0.006*h for h in H]

output_i=0
for i in range(N):
    if(min(abs(temp_data[i]-A),abs(temp_data[output_i]-A))==abs(temp_data[i]-A)):
        output_i=i
    else:
        continue

print(output_i+1)

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

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

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

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

t_2 = (t-a)/0.006
res = 1000000

for m in range(n):
  num_ = abs(t_2 - h[m])
  if res > num_:
    res = num_
    res_2 = m + 1
print(res_2)

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-h[i]*0.006)))

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

Solution (Python):
def solution(h, t, a):
    n = len(h)
    foo, goo = -1, 0
    for i in range(n):
        cur = abs(t * 1000- h[i] * 6 - a * 1000)
        if foo == -1 or goo > cur:
            goo = cur
            foo = i
    return foo

def main():
    n = int(input().strip())
    t, a = [int(i) for i in input().strip().split()]
    h = [int(i) for i in input().strip().split()]
    print(solution(h, t, a) + 1)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
t, a = tuple(map(int, input().split()))
h = list(map(int, input().split()))
mine = 1000
mini = 0
d=[0 for i in range(n)]
def tmp(x):
    return t - 0.006*x

for i in range(n):
    d[i] = abs( a - tmp(h[i]) )
    if mine > d[i]:
        mine = d[i]
        mini = i

print(mini+1)

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

f = lambda x:t-x*0.006

tmp = list(map(f,h))

MIN = 500000000000000000000
idx = 0

for i in range(len(tmp)):
    if abs(tmp[i]-a)<MIN:
        MIN = abs(tmp[i]-a)
        idx = i+1

print(idx)

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

for i in range(N):
    if abs(A - T + H[i] * 0.006) < dif:
        dif = 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_list = [int(h) for h in input().split()]
 
A_list = [abs((T-0.006*H_list[n])-A) for n in range(N)]
 
number = 0
for n ,x in enumerate(A_list):
    if x == min(A_list):
        number = n+1
print(number)

Solution (Python):
import numpy as np
n = int(input())
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))
tav = t - 0.006 * np.array(h)
tdiff = np.abs(a - tav)

print(1 + np.argmin(tdiff))

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

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

mine = 100000
mini = 0
for i in range(n):
    if abs(a - temp(h[i])) < mine:
        mine = abs(a - temp(h[i]))
        mini = i

print(mini + 1)

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

k=[t-h[i]*0.006 for i in range(n)]
l=10000
p=0
for i in range(n):
    if abs(a-k[i])<l:
        l=abs(a-k[i])
        p=i+1
print(p)

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

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

m = min(listT)
mi =listT.index(m) + 1

print(mi)

Solution (Python):
N = input()
T,A = map(int,raw_input().split())
H = map(int,list(raw_input().split()))
C = [0] * N

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

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

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

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

out = None
num = None

for i in range(N):
    avg = T - H[i]*0.006
    if num == None:
        out = i
        num = abs(A - avg)
        continue

    if num > abs(A - avg):
        out = i
        num = abs(A - avg)

print(out+1)

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

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

Solution (Python):
import numpy as np
N = int(input())
T,A = map(int,input().split(" "))
H =  list(map(lambda x:abs(T - float(x)*0.006 - A),input().split(" ")))
print(np.argmin(H)+1)

Solution (Python):
import numpy as np
N = int(input())
T,A = map(int,input().split(" "))
H =  list(map(int,input().split(" ")))
H = list(map(lambda x: abs((T - x*0.006)-A),H))

print(np.argmin(H)+1)

Solution (Python):

import sys


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

    nearest = [0, sys.maxsize]
    for i, x in enumerate(h, 1):
        tmp = abs((t - x * 0.006) - a)
        if tmp < nearest[1]:
            nearest = [i, tmp]

    print(nearest[0])


if __name__ == '__main__':
    main()

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

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

best=float('inf')
bp=1
for i in range(n):
    avr = t-(hl[i]*0.006)
    dif = abs(avr-a)
    if dif < best:
        best = dif
        bp = i+1
print(bp)

Solution (Python):




def bestpalace(n,t,a,placeList) :
	repeatRange = range(0,n)
	bestTemp = 1000
	bestTempPlace = -1
	for i in repeatRange:
		aveTemp = abs(a-(t-placeList[i]*0.006))
		if aveTemp < bestTemp:
			bestTemp = aveTemp
			bestTempPlace = i

	return bestTempPlace


if __name__ == '__main__':
	line1 = input()
	line2 = input()
	line3 = input()
	n = int(line1)
	t,a = map(int,line2.split())
	placeList = list(map(int,line3.split()))
	ans=bestpalace(n,t,a,placeList)+1
	print(ans)

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

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

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

ans = 0
t = 10 ** 10

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

print(ans)

Solution (Python):
one = input()
two = input().split()
three = input().split()

N = int(one)
T = int(two[0])
A = int(two[1])
H = list(map(int,three))

for i in range(1,N):
    tem = list(map(lambda x: T-0.006*x,H))

tem_dif = list(map(lambda x: abs(x-A),tem))

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

Solution (Python):
n = int(input())
t, a = map(int, input().split())
h = input().split()
ans = []
for i in h:
  ans.append(abs(t-int(i)*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()))
d = float('inf')
ans = 0
for i in range(n):
	d = min(d, abs(a-(t-0.006*h[i])))
	if d == abs(a-(t-0.006*h[i])):
		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] * 0.006)))
print(L.index(min(L)) + 1)

Solution (Python):

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

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



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

import numpy as np

print(np.array(temps).argmin()+1)

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


def calcTemp(x, y):
    return x - y * 0.006


min = 1000000
counter = 1
numPlace=0
for height in H:
    tmp = abs(A - calcTemp(T, height))
    if min > tmp:
        min = tmp
        numPlace = counter
    counter += 1
print(numPlace)

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

ans = 0
best = int(1e9)

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

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


total = None
result = 0

for i, x in enumerate(h):
    temp =   t - 0.006* x
    if total is None or abs(a - temp) < total:
        total = abs(a - temp)
        result = i + 1
print(result)

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