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



Sample input:
2
12 5
1000 2000


Sample output:
1

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(num)

Submission status: Wrong Answer

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
TA=10000
num=0
for i in range(n):
    if TA>abs(a-(t-h[i]*0.006))>0:
        num=i+1
        TA=abs(a-(t-h[i]*0.006))

print(num)

Submission status: Wrong Answer

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
TA=10000
num=0
for i in range(n):
    if TA>abs(a-(t-h[i]*0.006))>0:
        num=i+1
        TA=a-(t-h[i]*0.006)

print(num)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = list(map(int,input().split())) #splitで空文字を指定してあげないと、数値として(21 -11)が入るのでint型に入らない
H = list(map(int,input().split()))

tmp = 10**10
index = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = map(int, input().split())
nums = list(map(int, input().split()))

for num in nums:
    num = abs(A - (T - num * 0.006))

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

Submission status: Wrong Answer

Solution code:
# ABC113b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

Submission status: Wrong Answer

Solution code:
# ABC113b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

Submission status: Wrong Answer

Solution code:
# ABC113b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
t, a = map(int, input().split())
array = list(map(int, input().split()))

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
t, a = map(int, input().split())
array = list(map(int, input().split()))

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

print(ans)

Submission status: Wrong Answer

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

sub = 10**5
for i, h in enumerate(H):
    temp = t - h * 0.006
    if sub > (a - temp):
        sub = (a - temp)
        ans = i + 1
print(ans)

Submission status: Wrong Answer

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

m = min(h, key=lambda x: abs(t + x * 0.006- a))
print(h.index(m)+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = map(int, input().split())
Hn = list(map(int, input().split()))

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

Submission status: Wrong Answer

Solution code:
n=int(input())
t,a=map(int,input().split())
S=list(map(int,input().split()))
ans = -1
minsa = 10**10
for point,s in enumerate(S):
  sa = (t-s*0.006 - a)**2
  if minsa > sa:
    minsa = sa
    ans = point

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
tmp=input().split()
T=int(tmp[0])
A=int(tmp[1])
H=input().split()
H=[abs(A-(T-0.006*int(H[i]))) for i in range(0,N)]
min=H[0]
for i in range(1,N):
    if min>H[i]:
        min=H[i]
        index=i
print(i)

Submission status: Wrong Answer

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

ans = 0
difmin = 10*7

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

Submission status: Wrong Answer

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

ans = 0
difmin = 10*7

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
num=1
for i in range(n-1):
  diff=before-math.fabs(t-h[i+1]*0.006-a)
  print(diff)
  if diff>0:
    before=math.fabs(t-h[i+1]*0.006-a)
    num=i+2
print(num)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
num=1
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    print(diff)
    if diff>0:
        before=math.fabs(t-h[i+1]*0.006-a)
        num=i+1
print(num)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
before=math.fabs(t-h[0]*0.006-a)
mi=0
for i in range(n-1):
    diff=before-math.fabs(t-h[i+1]*0.006-a)
    if diff>0:
       before=math.fabs(t-h[i+1]*0.006-a)
       mi=i+1
print(mi)

Submission status: Wrong Answer

Solution code:
n = int(input())
t, a = map(int, input().split())
*h, = map(lambda x: t-x*0.006, (map(int, input().split())))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
T,A = map(int, input().split())
Hs = input().split()
for i in range(N):
  Hs[i] = int(Hs[i])
Hs = np.array(Hs)

Ts = T - Hs*0.006

Ts_A = np.abs(Ts - A)

print(np.argmin(Ts_A))

Submission status: Wrong Answer

Solution code:
N=int(input())
T,A=map(int,input().split())
height_list =list(map(int,input().split()))
val =10000
site=0
for i in range(N):
	if abs(A-T+0.006*height_list[i])<=val:
		val = abs(T-0.006*height_list[i])
		site = i
print(site+1)

Submission status: Wrong Answer

Solution code:
N=int(input())
T,A=map(int,input().split())
height_list =list(map(int,input().split()))
val =10000
site=0
for i in range(N):
	if abs(A-T+0.006*height_list[i])<val:
		val = abs(T-0.006*height_list[i])
		site = i
print(site+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T,A=map(int,input().split())
h_list =list(map(int,input().split()))
dif_list = [abs(A-T+x*0.006) for x in h_list]
mn =min(dif_list)
for i in range(0,N-1):
	if mn == dif_list[i]:
		break
print(i+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T,A=map(int,input().split())
h_list =list(map(int,input().split()))
dif_list = [abs(A-T+x*0.006) for x in h_list]
mn =min(dif_list)
for i in range(0,N-1):
	if mn == dif_list[i]:
		break
	else:
		continue
print(i+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
l =list(map(int,input().split()))
T = l[0]
A = l[1]
h_list =list(map(int,input().split()))
dif_list = [abs(A-T+x*0.006) for x in h_list]
mn =min(dif_list)
for i in range(0,N-1):
	if mn == dif_list[i]:
		break
	else:
		continue
print(i+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
l =list(map(int,input().split()))
T = l[0]
A = l[1]
h_list =list(map(int,input().split()))
dif_list = [abs(A-T+x*0.006) for x in h_list]
mn =min(dif_list)
for i in range(0,N-1):
	if mn == dif_list[i]:
		print(i+1)
		break
	else:
		continue

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
tmp = 1000
for i, h in enumerate(H):
    k = abs(A - (T - h * 0.006))
    if k < tmp:
        tmp = k
        ans = i

print(i + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
T,A = map(int,(input().split()))
H_list= list(map(int,input().split()))
maxi = 10**5+51
ans = 0
for i in H_list:
    if abs(A-T+0.006*i) <= maxi :
        maxi = abs(A-i)
        ans = H_list.index(i)
print(ans+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
T,A = map(int,(input().split()))
H_list= list(map(int,input().split()))
maxi = 10**5+51
ans = 0
for i in H_list:
    if abs(A-T-0.006*i) < maxi :
        maxi = abs(A-i)
        ans = H_list.index(i)
print(ans+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
T,A = map(int,(input().split()))
H_list= list(map(int,input().split()))
maxi = 10**5+51
ans = 0
for i in H_list:
    if abs(A-i) < maxi :
        maxi = abs(A-i)
        ans = H_list.index(i)
print(ans+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
a=10000
b=1
for i in range(len(H)):
  t=T-0.006*H[i]
  if abs(T-t)<a:
    a=abs(T-t)
    b=i+1
print(b)

Submission status: Wrong Answer

Solution code:
N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
a=10000
b=0
for i in range(len(H)):
  t=T-0.006*H[i]
  if abs(T-t)<a:
    a=abs(T-t)
    b=i+1
print(b)

Submission status: Wrong Answer

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

minT = 50
ans = 1

for i in range(N):
  aveT = T - H[i] * 0.006
  minT = min(minT, abs(aveT - A))
  #print(minT)
  if minT == abs(aveT - A):
    ans = i + 1
    
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

arr = [abs(A - int(T - Hs[i] * 0.006)) for i in range(N)]
print(arr.index(min(arr)) + 1)

Submission status: Wrong Answer

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

arr = [abs(abs(A) - abs(int(T - Hs[i] * 0.006))) for i in range(N)]
print(arr.index(min(arr)) + 1)

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
h.sort()
x = (t-a)/0.006

before = max(h)
ans = 0
i = 0
for i in range(n):
  if abs(h[i]-x) < before:
    before = abs(h[i]-x)
    ans = i+1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(range(1, N + 1))
T, A = map(int, input().split())
H = list(map(int, input().split()))
tmp = 10 ** 9 + 7
ind = -1
for i, j in zip(H, L):
    if abs(abs(A) - abs(T - i * 0.006)) < tmp:
        tmp = abs(abs(A) - abs(T - i * 0.006))
        ind = j
print(ind)

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
t = 999 #平均気温とAとの最短の差
p = 0 #その差を記録したポイント
for i in range(len(H)):
  if t > abs(A - T - H[i]*0.006):
    t = abs(A - T - H[i]*0.006)
    p = i+1
print(p)

Submission status: Wrong Answer

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
x=100000
ans=0
for i in h:
  if abs(t-i*0.006-a)<x:
    ans=h.index(i)
print(ans+1)

Submission status: Wrong Answer

Solution code:
n=int(input())
t,a=map(int,input().split())
h=map(int,input().split())
x=100000
ans=0
y=0
for i in h:
  y=y+1
  if abs(t-i*0.006-a)<x:
    ans=y
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

temps = {}
for i in range(len(heights)):
    temp = t - heights[i] * 0.006
    temps[i] = abs(5 - temp)

ranking = sorted(temps.items(), key = lambda x: x[1])
# print(ranking)
print(ranking[0][0] + 1)

Submission status: Wrong Answer

Solution code:
n=int(input())
T, A = map(int,input().split())
H=list(map(int,input().split()))
temp=[abs(T-x*0.0006-A) for x in H]
print(temp.index(min(temp)) + 1)

Submission status: Wrong Answer

Solution code:
n=int(input())
T, A = map(int,input().split())
H=list(map(int,input().split()))
ans=A-(T - H[0]* 0.006)
place=1
for i in range(1,n):
    if ans>A-(T - H[i]* 0.006):
        ans=A-(T - H[i]* 0.006)
        place=i+1
print(place)

Submission status: Wrong Answer

Solution code:
n=int(input())
T, A = map(int,input().split())
H=list(map(int,input().split()))
ans=A-(T - H[0]* 0.006)
place=1
for i in range(1,n):
    if H[i-1]>H[i]:
        ans=A-(T - H[i]* 0.006)
        place=i+1
print(place)

Submission status: Wrong Answer

Solution code:
def temp(t, x):
    return t - x * 0.006


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

index = None
min_diff = float('inf')
for i in range(n):
    diff = abs(temp(t, hs[i]) - a)
    if diff < min_diff:
        diff = min_diff
        index = i
print(i + 1)

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int, input().split())
h = list(map(int, input().split()))
hl=[]
ttl=[]
for x in h:
    tt = t-(x*0.006)
    hl.append(tt)


for y in hl:
    result = a-y
    ttl.append(result)

rel=ttl.index(min(ttl))
print(rel+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T,A = map(int,input().split())
Hn = list(map(int,input().split()))
minnum = 10*9
minindex = 0
for h in range(len(Hn)):
    if minnum>abs(A-(T-Hn[h]*0.006)):
        minnum = abs(A-(T-Hn[h]*0.006))
        minindex = h
print(minindex+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
ans = []
for i in range(n):
  mean = t - h[i]*0.006
  if a >= 0 and mean < 0:
    ans.append(a+mean)
  elif a >= 0 and mean >= 0:
    ans.append(abs(a-mean))
  elif a < 0 and mean >= 0:
    ans.append(a+mean)
  elif a < 0 and mean < 0:
    ans.append(abs(a-mean))
print(ans.index(min(ans))+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
t, a = (int(i) for i in input().split())
h = [int(i) for i in input().split()]
nearest_temper = 10000
ans_i = 0
for i in range(n):
    cur = t - h[i] * 0.006
    if a - cur < nearest_temper:
        nearest_temper = a - cur
        ans_i = i + 1
print(ans_i)

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
m = 1000000000
ans = 0
for i in range(len(h)):
  j = m
  m = min(m,t-h[i]*0.006)
  if j==m:
    None
  else:
    ans = i+1
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Wrong Answer

Solution code:
n = int(input())
t, a = map(int,input().split())
array = list(map(lambda x: abs(a - (t - int(x) * 0.006)),input().split()))
print(array)
cnt = 0
Min = 9999
for i in range(n):
    if Min > array[i]:
        Min = array[i]
        cnt = i + 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = [int(x) for x in input().split()]
HN = [int(x) for x in input().split()]
dT = 10 ** 10
res = 0
for i, h in enumerate(HN):
  tdT = A - (T - h * 0.006)
  if tdT < dT:
    res = i
    dT = tdT
    
print(res + 1)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

min=5000

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

for i in range(N):
    #print(abs(A-abs(T-H[i]*0.006)))
    if abs(A-abs(T-H[i]*0.006)) <= min:
        min=abs(A-abs(T-H[i]*0.006))
        buf=i+1

print(buf)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

min=5000

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

for i in range(N):
    #print(abs(A-abs(T-H[i]*0.006)))
    if abs(A-abs(T-H[i]*0.006)) <= min:
        min=abs(A-abs((T-H[i])*0.006))
        buf=i+1

print(buf)

Submission status: Wrong Answer

Solution code:
s = input()

min_diff = 1000
s_list = list(s)
for i in range(1, len(s_list) - 1):
    diff = abs(int(s_list[i - 1] + s_list[i] + s_list[i + 1]) - 753)
    min_diff = min(min_diff, diff)

print(min_diff)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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


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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

a = abs(T - (12 - H[0] * 0.006))
ans = 0
for i in range(N):
    if a > abs(a - (T - (12 - H[i] * 0.006))):
        a = abs(T - (12 - H[i] * 0.006))
        ans = i+1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

tmp , near = map(int, input().split())

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

num = 0

box=[]

for x in height:
    av =tmp - x*0.006
    result = abs(av-near)
    box.append(result)
    
    
    
print(box.index(max(box)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

list_judge = []

for i in list_h:
    aaa= T-(i*0.006)
    bbb = int(abs(A - aaa))
    list_judge.append(bbb)

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

Submission status: Wrong Answer

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

list_judge = []

for i in list_h:
    aaa= T-int(i*0.006)
    bbb = abs(A - aaa)
    list_judge.append(bbb)

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

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = (int(x) for x in input().split())
b = list(map(int,input().split()))
c = []

for i in b:
  c.append(abs((t - i * 0.006))-a)
  
print(c.index(min(c))+1)

Submission status: Wrong Answer

Solution code:
Num = int(input())
Num2, Num3 = map(int,input().split())
Num_Array = list(map(int,input().split()))
result = 1000000000

for i  in range(0,Num):
    Check = abs(Num2 - (Num_Array[i] *0.006))
    if result > abs ( Num3 - Check):
        result = abs(Num3 - Check )
        kekka = i + 1
print(kekka)

Submission status: Wrong Answer

Solution code:
n=int(input())
t,a=map(int,input().split())
hlist=list(map(int,input().split()))
def temp(t,x):
  temp = t-0.006*x
  return temp

diff = []
min=0
diff = 0
for i,h in enumerate(hlist):
  diff = abs(temp(t,h) - a)
  if min > diff:
    min = i+1
print(min)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
avg_temparature, kijun_temparature = map(int,input().split())
list_height = [int(i) for i in input().split()]

result_position = 0
for candidate in range(1,len(list_height)):
    a = avg_temparature - (list_height[result_position] * 0.006)
    b = avg_temparature - (list_height[candidate] * 0.006)
    if kijun_temparature - a > kijun_temparature - b:
        result_position = candidate

print(result_position+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
t, a = map(int, input().split())
h_def = list(map(int, input().split()))
h_temp = []

for i in range(n): 
    h_temp.append(a - (t - h_def[i] * 0.006))

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

Submission status: Wrong Answer

Solution code:
from numpy import array, argmin

input()
temp_on_sea, oracle = map(int, input().rstrip("\n").split())
heights = list(map(int , input().rstrip("\n").split()))

temp_diff = [temp_on_sea - height * 0.006 - oracle for height in heights]

print(array(temp_diff).argmin() + 1)

Submission status: Wrong Answer

Solution code:
from numpy import array, argmin

input()
temp_on_sea, oracle = map(int, input().rstrip("\n").split())
heights = list(map(int , input().rstrip("\n").split()))

temp_diff = [temp_on_sea - height * 0.006 for height in heights]

print(array(temp_diff).argmin() + 1)

Submission status: Wrong Answer

Solution code:
from numpy import array, argmin

input()
temp_on_sea, oracle = map(int, input().rstrip("\n").split())
heights = list(map(lambda x: abs(int(x) - oracle) , input().rstrip("\n").split()))

print(array(heights).argmin() + 1)

Submission status: Wrong Answer

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

index = 1
diff = []

if n == 1:
    print(n)
    exit()

diff.append(abs(t - 0.006 * h[0] - a))

for i in range(1, n):
    diff.append(abs(t - 0.006 * h[i] -a))
    if diff[i] <= diff[index]:
        index = i

print(index+1)

Submission status: Wrong Answer

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

index = 1
diff = []

if n == 1:
    print(n)
    exit()

diff.append(abs(t - 0.006 * h[0] - a))

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

print(index)

Submission status: Wrong Answer

Solution code:
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
diff = 10000000
index = 0

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

print(index)

Submission status: Wrong Answer

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

min_i = 1001
min_t = 50

for i,p in enumerate(H):
    t = T - p * 0.006
    diff = abs(A-t)
    if min_t > diff:
        min_i = i+1
        min_t = diff

print(min_i)

Submission status: Wrong Answer

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

min_i = 1001
min_t = 50

for i,p in enumerate(H):
    t = T - p * 0.006
    diff = abs(A-t)
    if min_t >= diff:
        min_i = i+1
        min_t = diff

print(min_i)

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
tmp = list(map(lambda x: t - x * 0.006,h))
diff = list(map(lambda y: abs(a - y),h))
mini = min(diff)
for i in range(n):
  if mini == diff[i]:
    print(i+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
list = input().split()
T = list[0]
A = list[1]
print('Tは{}'.format(T))
print('Aは{}'.format(A))
list2 = input().split()
H = []
T_mean = []
minimum = []
for i in range(N):
    H.append(list2[i])
    T_mean.append(int(T)-int(H[i])*0.006)
    minimum.append(abs(T_mean[i] - int(A)))


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int, input().split())
h = map(int, input().split())
import numpy as np
print(np.argmin([abs(a - (t - i*6e-3)) for i in h]))

Submission status: Wrong Answer

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