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()))
ans=9999
for x in h:
    if ans>abs((t-x*0.006)-a):
        ans=abs((t-x*0.006)-a)
print(int(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))
ans = 1e9
for h in H:
  x = abs(A-T-h*0.006)
  if(ans > x):
    tmp = h
    ans = x
print(H.index(tmp)+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
HT = list(map(lambda x: T - x*0.6, H))
answer = 0
for i in range(len(HT)):
    if abs(HT[i] - A) < abs(HT[answer]-A):
        answer = i
print(answer + 1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
HT = list(map(lambda x: T - x*0.6, H))
answer = 0
for i in range(len(HT)):
    if abs(HT[i] - A) < abs(HT[answer]-A):
        answer = i
print(answer + 1)

Submission status: Wrong Answer

Solution code:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
HT = list(map(lambda x: T - x*0.6, H))
answer = 0
for i in range(len(HT)):
    if abs(HT[i] - A) < abs(H[answer]-A):
        answer = i
print(answer+1)

Submission status: Wrong Answer

Solution code:
#! python
N = int(input())
T,A = [int(x) for x in input().split()]
Hlist = [int(x) for x in input().split()]

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

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(float,input().split())
temp = list(map(int,input().split()))
temp.sort()
place = 1
placetemp = abs(a-(t-temp[0]*0.006))
for i in range(n-1):
	if abs(a-(t-temp[i+1]*0.006)) < placetemp:
		place = i+2
		placetemp = abs(a-(t-temp[i+1]*0.0006))
print(place)

Submission status: Wrong Answer

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


if A >= 0:
    diff = [abs(A - (T - h * 0.006)) for h in H]
else:
    diff = [abs(A + (T - h * 0.006)) for h in H]
print(diff.index(min(diff)) + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_=input()
T,A = map(int,input().split())
H = map(int, input().split())
min_i = -1
min_d = 10**10
for i,h in enumerate(H):
  d = abs(A-(T-h*0.006))
  print(d)
  if d<min_d:
    min_d=d
    min_i=i
print(min_i+1)

Submission status: Wrong Answer

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
t, a = [int(x) for x in stdin.readline().rstrip().split()]
hs = [int(x) for x in stdin.readline().rstrip().split()]
answers=[t-h*0.006 for h in hs]
answers=[abs(an-a)for an in answers]
print(min(answers))

Submission status: Wrong Answer

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
t, a = [int(x) for x in stdin.readline().rstrip().split()]
hs = [int(x) for x in stdin.readline().rstrip().split()]
answers=[t-h*0.006 for h in hs]
ansers=[abs(an-a)for an in answers]
print(min(answers))

Submission status: Wrong Answer

Solution code:
from sys import stdin
import numpy as np
N = int(input())
T, A = [int(x) for x in stdin.readline().rstrip().split()]
H = list(map(int, input().split()))
d = []

for i in range(len(H)):
    d.append(abs(T-H[i]*0.006-5))
print(np.argmin(d)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
T,A=map(int,input().split())
H=[int(x) for x in input().split()]
s=float("inf")
j=0
for i in range(N):
  tempgap=abs(T-H[i]*0.006-A)
  if tempgap<s:
    s,j=tempgap,i
print(i+1)

Submission status: Wrong Answer

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

ls = [abs(A-(T-x*6/1000)) for x in list_H]
print(ls.index(min(ls)))

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int,input().split())
li = list(map(int,input().split()))
p = []
for i in range(len(li)):
    m = abs(t - 0.006 * li[i])
    p.append(m)

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

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int,input().split())
li = list(map(int,input().split()))
p = []
for i in range(len(li)):
    m = t - 0.006 * li[i]
    p.append(m)
print(int((t-min(p)) / 0.006))

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int,input().split())
li = list(map(int,input().split()))
p = []
for i in range(len(li)):
    m = t - 0.006 * li[i]
    p.append(m)
print((t-min(p)) // 0.006)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
d = 1 << 32
for i in range(N):
    if abs((T - H[i]*0.0006) - A) < d:
        d = abs((T - H[i]*0.006) - A)
        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
d = 1 << 32
for i in range(N):
    if abs((12 - H[i]*0.0006) - A) < d:
        d = abs((12 - H[i]*0.006) - A)
        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()))
v = t-a
for i in range(n):
    h[i] = abs(v-h[i])
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()))
v = t-a
for i in range(n):
    h[i] = abs(v-h[i])
print(h.index(min(h))-1)

Submission status: Wrong Answer

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

I = 999999
minT = 999999

for i in range(n):
    if minT >= a - (t - 0.006 * H[i]):
        minT = a - (t - 0.006 * H[i])
        I = i

print(I+1)

Submission status: Wrong Answer

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

c = 1
for i in H:
    Hls.append((abs(A - (T - int(i)*0.006)),int(c)))
    c = c+1

Submission status: Wrong Answer

Solution code:
#my_answer
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))#N times
#print(H)
#temp=T-x*0.006
temp=[0]*N
gap=[0]*N

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

print(temp)
for i in range(N):
	if(gap[i]==min(gap)):
		print(i+1)

Submission status: Wrong Answer

Solution code:
#my_answer
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))#N times
#print(H)
#temp=0.006*(T-x)
temp=[0]*N
gap=[0]*N

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

for i in range(N):
	if(gap[i]==min(gap)):
		print(i+1)

Submission status: Wrong Answer

Solution code:
#my_answer
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))#N times
print(H)
#temp=0.006*(T-x)
temp=[0]*N
gap=[0]*N

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

for i in range(N):
	if(gap[i]==min(gap)):
		print(i+1)

Submission status: Wrong Answer

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

min_ = 10000000000000
ans = None
for i, x in enumerate(h):
    tmp = t - x*0.006# その地点の平均気温
    if a > 0 and tmp > 0:
        sa = a - tmp
    elif a > 0 and tmp < 0:
        sa = a + tmp
    elif a < 0 and tmp > 0:
        sa = abs(a) + tmp
    else:
        sa = abs(a) - abs(tmp)
    sa = abs(sa)
    if sa < min_:
        min_ = sa
        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()))

t = abs(t)

min_ = 10000000000000
ans = None
for i, x in enumerate(h):
    tmp = t - x*0.006# その地点の平均気温
    if a > 0 and tmp > 0:
        sa = a - tmp
    elif a > 0 and tmp < 0:
        sa = a - abs(tmp)
    elif a < 0 and tmp > 0:
        sa = abs(a) - tmp
    else:
        sa = abs(a) - abs(tmp)
    sa = abs(sa)
    if sa < min_:
        min_ = sa
        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()))

min_ = 10000000000000
ans = None
for i, x in enumerate(h):
    tmp = t - x*0.006# その地点の平均気温
    if a > 0 and tmp > 0:
        sa = a - tmp
    elif a > 0 and tmp < 0:
        sa = a - abs(tmp)
    elif a < 0 and tmp > 0:
        sa = abs(a) - tmp
    else:
        sa = abs(a) - abs(tmp)
    sa = abs(sa)
    if sa < min_:
        min_ = sa
        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()))

sa = 10000000000000
ans = None
for i, x in enumerate(h):
    tmp = t - x*0.006# その地点の平均気温
    if a - tmp < sa:
        sa = a - tmp
        ans = i + 1
print(ans)

Submission status: Wrong Answer

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

list = []

for i in range(n):
    temperature = abs(t - list_original[i]*0.006)
    list.append(abs(a - temperature))

point = list.index(min(list)) + 1

print(point)

Submission status: Wrong Answer

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

list = []

for i in range(n):
    temperature = abs(t - list_original[i]*0.006)
    list.append(temperature)

point = list.index(min(list)) + 1

print(point)

Submission status: Wrong Answer

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

list = []

for i in range(n):
    temperature = t - list_original[i]*0.006
    list.append(temperature)

point = list.index(min(list)) + 1

print(point)

Submission status: Wrong Answer

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

print(ans+1)

Submission status: Wrong Answer

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

count = t
result = 0

for i in range(n):
    test = t - list[i]*0.006
    if abs(test-a) <= count:
        count = abs(test-a)
        result = i+1
    else:
        pass
print(result)

Submission status: Wrong Answer

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

count = t
result = 0

for i in range(n):
    test = t - list[i]*0.006
    if test >= a:
        if test-a <= count:
            count = test - a
            result = i+1
        else:
            pass
    else:
        if a-test <= count:
            count = a - test
            result = i+1
        else:
            pass
          
print(result)

Submission status: Wrong Answer

Solution code:
N = input()

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

H = list(map(int, input().split()))
answers=[]
for h in H:
    sub = A - h*0.006
    answers.append(sub)

max_idx = answers.index(max(answers))+1

print(max_idx)

Submission status: Wrong Answer

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

ans_H = (T - A)/0.006
print(ans_H)
dif = 10**20
ans = 0
for i in range(len(H)):
	temp_dif = abs(ans_H - H[i])
	print(temp_dif)
	if (dif > temp_dif):
		dif = temp_dif
		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()))

ans_H = (T - A)/0.0006
dif = 10**20
ans = 0
for i in range(len(H)):
	temp_dif = abs(ans_H - H[i])
	if (dif > temp_dif):
		dif = temp_dif
		ans = i + 1
	
print(ans)

Submission status: Wrong Answer

Solution code:
def tempDif(h,T,A):
  temp = T - 0.006*h
  dif = A -temp
  if dif < 0:
    dif = -dif
  return dif
 
N = int(input())
T,A = map(int,input().split())
lis = [int(n) for n in input().split()]
 
lisnew = [tempDif(H,T,A) for H in lis]
print(lisnew.index(max(lisnew)))

Submission status: Wrong Answer

Solution code:
def tempDif(h,T,A):
  temp = T - 0.006*h
  dif = A -temp
  if dif < 0:
    dif = -dif
  return dif

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

lisnew = [tempDif(H,T,A) for H in lis]
s = [i for i,x in enumerate(lisnew) if x == min(lisnew)]
print(s[0])

Submission status: Wrong Answer

Solution code:
def tempDif(h,T,A):
  temp = T - 0.006*h
  dif = A -temp
  if dif < 0:
    dif = -dif
  return dif

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

lisnew = [tempDif(H,T,A) for H in lis]
print(i for i,x in enumerate(lisnew) if x == min(lisnew))

Submission status: Wrong Answer

Solution code:
def tempDif(h,T,A):
  temp = T - 0.006*h
  dif = A -temp
  if dif < 0:
    dif = -dif
  return dif

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

lisnew = [tempDif(H,T,A) for H in lis]
print(i for i,x in lisnew if x == min(lisnew))

Submission status: Wrong Answer

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

li = []
for i in range(len(h)):
  li.append(abs(a - (t - h[i]*0.006)))
  
print(li.index(min(li)))

Submission status: Wrong Answer

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

li = []
for i in range(len(h)):
  li.append(abs(a - t - h[i]*0.006))
  
print(li.index(min(li)))

Submission status: Wrong Answer

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

li = []
for i in range(len(h)):
  li.append(abs(t - h[i]*0.006))
  
print(li.index(min(li)))

Submission status: Wrong Answer

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

li = []
for i in range(len(h)):
  li.append(t - h[i]*0.006)
  
print(li.index(min(li)))

Submission status: Wrong Answer

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

temp = []
for i in e:
    temp.append(abs(t - i * 0.006 - a))
    
print(e)
print(temp)
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()))

y = 1000

for i,data in enumerate(H):
    x = A - (T - data * 0.006)
    if y > abs(x):
        y = abs(x)
        result = i+1

print(i)

Submission status: Wrong Answer

Solution code:
import math

if __name__ == '__main__':
    n = int(input())
    t, a = map(int, input().split())
    h = map(int, input().split())

    diff = 0
    answer = -1
    first = True

    for index, height in enumerate(h):
        temp = t - height * 0.006
        current_diff = math.fabs(a - temp)

        if current_diff <= diff or first:
            diff = current_diff
            answer = index
            first = True

    print(answer)

Submission status: Wrong Answer

Solution code:
import math

if __name__ == '__main__':
    n = int(input())
    t, a = map(int, input().split())
    h = map(int, input().split())

    diff = 0
    answer = -1
    first = True

    for index, height in enumerate(h):
        temp = t - height * 0.006
        current_diff = math.fabs(a - temp)
        print(index, temp)

        if current_diff <= diff or first:
            diff = current_diff
            answer = index
            first = True

    print(answer)

Submission status: Wrong Answer

Solution code:
import math

if __name__ == '__main__':
    n = int(input())
    t, a = map(int, input().split())
    h = map(int, input().split())

    diff = -1
    answer = -1
    first = True

    for index, height in enumerate(h):
        temp = t - height * 0.006
        current_diff = math.fabs(a - height)

        if current_diff <= diff or first:
            diff = current_diff
            answer = index
            first = True

    print(answer)

Submission status: Wrong Answer

Solution code:
import math

if __name__ == '__main__':
    n = int(input())
    t, a = map(int, input().split())
    h = map(int, input().split())

    diff = -1
    answer = -1
    for index, height in enumerate(h):
        temp = t - height * 0.006
        if math.fabs(a - height) <= a or diff == -1:
            answer = index

    print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t_array = [abs(t - 0.006 * h) - a for h in h_array]
ans = t_array.index(min(t_array)) + 1
print(ans)

Submission status: Wrong Answer

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

tmp = {i+1:abs(int(T-H*0.006)-A) for i, H in enumerate(Hs)}
ans = min(tmp, key=tmp.get)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(map(int,input().split()))
x = list(map(int,input().split()))
ans = [0,10**10]
for i in range(n):
    y = s[0]-int(x[i]*0.006)
    # print(abs(y-s[1]),ans[1])
    if abs(y-s[1])<ans[1]:
        ans[0] = i+1
        ans[1] = abs(y-s[1])
print(ans[0])

Submission status: Wrong Answer

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

lst=[]

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

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

Submission status: Wrong Answer

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

lst=[]

for i in H:
    lst.append(abs(A-abs(T-i*0.006)))

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

Submission status: Wrong Answer

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

lst=[]

for i in H:
    lst.append(abs(A-abs(T-i*0.006)))

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

Submission status: Wrong Answer

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

lst=[]

for i in H:
    lst.append(A-(T-i*0.006))


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

Submission status: Wrong Answer

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

lst=[]

for i in H:
    lst.append(A-(T-i*0.006))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
t,a = map(int, input().split())
l = list(map(int, input().split()))
min=2000
ans = 0
for j in range(n):
    if abs(a-t+0.006*l[j]) < min:
        ans=j+1
print(ans)

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(len(H)):
    x.append(abs(A-(T-H[i]*0.006)))

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

Submission status: Wrong Answer

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

ret = []
for i, h in enumerate(H):
    ret.append(abs(a - (t - 0.006 * h)))
print(H[ret.index(min(ret))])

Submission status: Wrong Answer

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

ans = []

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())
t, a = list(map(int, input().split()))
li = np.asarray(list(map(int, input().split())))

li2 = np.abs(t - li * 0.006 - a)
print(np.argmin(li2))

Submission status: Wrong Answer

Solution code:
N=int(input())
T,A=map(int,input().split())
H_list=list(map(int,input().split()))
a=list(map(lambda x:abs(A-(T-x*0.006)), H_list))
#print(a)
print(min(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X=input().split(" ")
#print(X)
min=0
number=1

for i in range(0,N):
  ondo=T-0.006*int(X[i])
  sa=abs(ondo-A)
  #print(i+1,sa)
  if min==0:
    min=sa
  if sa<=min:
    min=sa
    number=i+1
    
print(number)

Submission status: Wrong Answer

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

X=input().split(" ")
#print(X)
min=0
number=0

for i in range(0,N):
  ondo=T-0.006*int(X[i])
  sa=abs(ondo-A)
  #print(i+1,sa)
  if min==0:
    min=sa
  if sa<min:
    min=sa
    number=i+1
    
print(number)

Submission status: Wrong Answer

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

X=input().split(" ")
#print(X)
min=0

for i in range(0,N):
  ondo=T-0.006*int(X[i])
  sa=abs(ondo-A)
  #print(i+1,sa)
  if min==0:
    min=sa
  if sa<=min:
    min=sa
    number=i+1
    
print(number)

Submission status: Wrong Answer

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

X=input().split(" ")
#print(X)
min=0

for i in range(0,N):
  sa=abs(int((T-0.006*int(X[i]))-A))
  #print(i,sa)
  if min==0:min=sa
  if sa<=min:
    min=sa
    number=i+1
    
print(number)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

min_diff = T+60
index = 1
min_index = 0
for h in h_list:
    t = T-h*0.006
    diff = abs(t-A)
    if min_diff > diff:
        min_diff = diff
        min_index = index

    index += 1

print(min_index)

Submission status: Wrong Answer

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

min = 10000000
index = -1

for i in range(N):
  temp = int(T) - int(H[i]) * 0.006
  print(temp)
  if min > abs(int(A) - temp):
    min = abs(int(A) - temp)
    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()))
H_rated = [abs(A - T-(H[i]*0.006)) for i in range(N)]
print(H_rated.index(min(H_rated))+1)

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
t,a = map(int, input().split())
h = list(map(int, input().split()))
tt = [abs(a - (t-h[i]*0.006)) for i in range(n)]
ans = 1000000000
for i in range(n):
  ans = min(ans, tt[i])
for i in range(n):
  if tt[i] == ans:
    print(i)
    sys.exit()

Submission status: Wrong Answer

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

temperature_diff_list = []

for height in heights:
  temperature_diff = A - (T - height * 0.006)
  temperature_diff_list.append(temperature_diff)
    
print(temperature_diff_list.index(min(temperature_diff_list)) + 1)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
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(A - (T - h * 0.006))
    print(m.index(min(m)) + 1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
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(A - (T - h * 0.0006))
    print(m.index(min(m)) + 1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#B
N = int(input())
T, A = [int(x) for x in input().split()]
H = [int(x) for x in input().split()]
#print(N, T, A)#
#print(H)#

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

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

Submission status: Wrong Answer

Solution code:
#B
N = int(input())
T, A = [int(x) for x in input().split()]
H = [int(x) for x in input().split()]
print(N, T, A)#
print(H)#

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

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

Submission status: Wrong Answer

Solution code:
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 abs(a - kionsa) < kionsa_min:
        ans = i
        kionsa_min = kionsa
print(ans + 1)

Submission status: Wrong Answer

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

dist = {}
for i in range(N):
  tempra = T - H[i]*0.006
  dist[i+1] = abs(tempra - abs(A))
print(min(dist, key = dist.get))

Submission status: Wrong Answer

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

dist = {}
for i in range(N):
  tempra = T - H[i]*0.006
  dist[i+1] = abs(tempra - abs(A))
print(min(dist, key = dist.get))
print(dist)

Submission status: Wrong Answer

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

dist = {}
for i in range(N):
  tempra = T - int(H[i]*0.006)
  dist[i+1] = abs(tempra - abs(A))
print(min(dist, key = dist.get))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

tmp = 111

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

tmp = 111

for i in range(N):
  tmp = min(tmp, abs(A - (T - int(H[i])*0.006)))
  ans = i
  
print(ans)