ZhenlongDai/ACPR huggingface dataset:
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t,a = map(int, input().split())
h = list(map(int,input().split()))
ans = 1000000
for i in range(n):
    x = t - h[i]*0.006
    ans = min(ans, abs(x-a))
print(ans)  

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1.0


Fixed submission (verdict: Accepted):
n = int(input())
t,a = map(int, input().split())
h = list(map(int,input().split()))
ans = -1
mn = 10**9
for i in range(n):
    x = abs(t - h[i]*0.006 - a)
    if x < mn:
        mn = x
        ans = i+1
print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
iN = int(input())
iT,iA = [int(_) for _ in input().split()]
aH = list(map(lambda x: abs(iT-x*0.006 -iA) , [int(_) for _ in input().split()]))
print(aH)
iMin = min(aH)
for i in range(iN):
    if aH[i] == iMin :
        print(i+1)
        exit()


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1.0, 5.0]
1


Fixed submission (verdict: Accepted):
iN = int(input())
iT,iA = [int(_) for _ in input().split()]
aH = list(map(lambda x: abs(iT-x*0.006 -iA) , [int(_) for _ in input().split()]))
iMin = min(aH)
for i in range(iN):
    if aH[i] == iMin :
        print(i+1)
        exit()

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
t,a=map(int,input().split())
ln=[t-0.006*int(x) for x in input().split()]
print(min(ln))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0.0


Fixed submission (verdict: Accepted):
n=int(input())
t,a=map(int,input().split())
ln=[int(x) for x in input().split()]
ans=[abs(t-0.006*x-a)  for x in ln]
print(ans.index(min(ans))+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(min(a))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1.0


Fixed submission (verdict: Accepted):
N=int(input())
T,A=map(int,input().split())
H_list=list(map(int,input().split()))
a=list(map(lambda x:abs((T-x*0.006)-A), H_list))


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

Problem: p03220
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def p_b():
    n = int(input())
    t, a = map(int, input().split())
    *H, = map(int, input().split())
    ans = 10**9
    idx = -1
    for i, h in enumerate(H):
        if ans > abs(a - (t - h * 0.006)):
            ans = abs(t - h * 0.006)
            idx = i + 1
    print(idx)
    
p_b()

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
def p_b():
    n = int(input())
    t, a = map(int, input().split())
    *H, = map(int, input().split())
    ans = 10**9
    idx = -1
    for i, h in enumerate(H):
        if ans > abs(a - (t - h * 0.006)):
            ans = abs(a - (t - h * 0.006))
            idx = i + 1
    print(idx)
    
p_b()
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
t,a=map(int,input().split())
h = list(map(int, input().split()))

best_point=0
best=float('inf')
i=0
for hi in h:
    tmp = t - (hi * 0.006)
    dif = abs(a - tmp)
    if abs(dif) < abs(best):
        best = dif
        best_point = i + 1
        print(best_point)
    i += 1
print(best_point)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1
1


Fixed submission (verdict: Accepted):
n=int(input())
t,a=map(int,input().split())
h = list(map(int, input().split()))

best_point=0
best=float('inf')
i=0
for hi in h:
    tmp = t - (hi * 0.006)
    dif = abs(a - tmp)
    if abs(dif) < abs(best):
        best = dif
        best_point = i + 1
    i += 1
print(best_point)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = map(int, input().split())
h = [int(_) for _ in input().split()]

nearest = 100000000
ans = 0

for idx, i in enumerate(h):
    temp = abs(t - i * 0.006)
    if nearest > temp:
        nearest = temp
        ans = idx + 1

print(ans)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
t, a = map(int, input().split())
h = [int(_) for _ in input().split()]

nearest = 100000000
ans = 0

for idx, i in enumerate(h):
    temp = t - i * 0.006
    temp = abs(a-temp)
    if nearest > temp:
        nearest = temp
        ans = idx + 1

print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
m=a
ans=0
for i in h:
  if abs((t-i*0.006)-a) < m:
    m=abs((t-i*0.006)-a)
    ans=i+1
print(ans)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1001


Fixed submission (verdict: Accepted):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
m=100000
ans=0
for i in range(n):
  if abs((t-h[i]*0.006)-a) < m:
    m=abs((t-h[i]*0.006)-a)
    ans=i+1
print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t,a = map(int,input().split())
h= list(map(int,input().split()))

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

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1.0
5.0
1


Fixed submission (verdict: Accepted):
n = int(input())
t,a = map(int,input().split())
h= list(map(int,input().split()))

min_diff = 10**10
ans = 0
for i in range(n):
  temp = abs(a - (t - h[i]*0.006))  
  if min_diff > temp:
    min_diff = temp
    ans = i+1
print(ans)
Problem: p03220
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))

a_meter = (12-A*1000)

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

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))


ans = -1
diff = float('inf')
for i in range(N):
    d = abs(1000*T-6*H[i]-1000*A)

    if d < diff:
        diff = d
        ans = i + 1
print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
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(min(lisnew))+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))

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

print(ans.index(min(ans)))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))

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

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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
ave,risou= map(int, input().split())
h=[0]*a
h=list(map(int, input().split()))
for i in range(a):
    h[i]=risou-abs(ave-(h[i]*0.006))
print(h.index(max(h))+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
a=int(input())
ave,risou= map(int, input().split())
h=[0]*a
h=list(map(int, input().split()))
for i in range(a):
    h[i]=abs(risou-(ave-(h[i]*0.006)))
print(h.index(min(h))+1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(avg)
        continue

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

print(out+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t,a = (int(i) for i in input().split(' '))
h = [abs((t - int(i) * 0.0006) - a) for i in input().split(' ')]
print(h.index(min(h))+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = map(int, input().split())
hs = list(map(int, input().split()))

min = 99999
ans = 99999

for i in range(n):
    tmp = t - hs[i] * 0.006
    d = abs(a-tmp)
    print(d < min , d, min)
    if d < min:
        ans = i
        min = d

print(ans+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
True 1.0 99999
False 5.0 1.0
1


Fixed submission (verdict: Accepted):
n = int(input())
t, a = map(int, input().split())
hs = list(map(int, input().split()))

min = 99999
ans = 99999

for i in range(n):
    tmp = t - hs[i] * 0.006
    d = abs(a-tmp)
    if d < min:
        ans = i
        min = d

print(ans+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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:
        print(i, tmp[i])
        MIN = abs(tmp[i]-a)
        idx = i+1

print(idx)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0 6.0
1


Fixed submission (verdict: Accepted):
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)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = [int(num) for num in input().split()]
H = [int(num) for num in input().split()]

best_diff = None
best_height = None
for h in H:
    avg_tmp = T - h * 0.006
    diff = abs(A - avg_tmp)

    print(diff)

    if best_diff is None:
        best_diff = diff
        best_height = h
    elif diff < best_diff:
        best_diff = diff
        best_height = h
    else:
        pass

print([i for i, val in enumerate(H, 1)
       if val == best_height][0])


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1.0
5.0
1


Fixed submission (verdict: Accepted):
N = int(input())
T, A = [int(num) for num in input().split()]
H = [int(num) for num in input().split()]

best_diff = None
best_height = None
for h in H:
    avg_tmp = T - h * 0.006
    diff = abs(A - avg_tmp)

    if best_diff is None:
        best_diff = diff
        best_height = h
    elif diff < best_diff:
        best_diff = diff
        best_height = h
    else:
        pass

print([i for i, val in enumerate(H, 1)
       if val == best_height][0])

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
candidates = input()
T, A = map(int, input().split())
print(T,A)
heights = input().split()
print(heights)
ans = []
for i in range(len(heights)):
  ans.append(A - (T - int(heights[i])*0.006))
answer = ans.index(min(ans))
print(answer + 1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
12 5
['1000', '2000']
1


Fixed submission (verdict: Accepted):
candidates = input()
T, A = map(int, input().split())
heights = input().split()
ans = []
for i in range(len(heights)):
    if T - int(heights[i])*0.006 >= A:
        ans.append((T - int(heights[i])*0.006) - A)
    else:
        ans.append(A - (T - int(heights[i])*0.006))
answer = ans.index(min(ans))
print(answer + 1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
h = [abs(A - (T - x * 0.006)) for x in H]

m = h[0]
ans = 1
for i in range(len(h)):
    if h[i] < m:
        m = h[i]
        ans = i + 1


print(h)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1.0, 5.0]


Fixed submission (verdict: Accepted):
N = int(input())
T, A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
h = [abs(A - (T - x * 0.006)) for x in H]

m = h[0]
ans = 1
for i in range(len(h)):
    if h[i] < m:
        m = h[i]
        ans = i + 1


print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
t,a=list(map(int,input().split()))
H=list(map(int,input().split()))
L=list()

for i in range(len(H)):
  H[i]=abs(1000*a-t*1000-H[i]*6)
  
print(H.index(min(H)))


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
t,a=list(map(int,input().split()))
H=list(map(int,input().split()))

for i in range(0,len(H)):
  H[i]=abs(1000*a-t*1000+H[i]*6)
  
print(H.index(min(H))+1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = (int(i) for i in input().split())
H = [int(i) for i in input().split()]

H_T = [0 for i in range(len(H))]
for i in range(len(H)):
    H_T[i] = float(T) - float(H[i])*0.006

min = 50
index = 0
for i in range(len(H_T)):
    if(abs(H_T[i] - A) < min):
        index = i
        min = abs(H_T[i] - A)
print(H_T)
print(index+1)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[6.0, 0.0]
1


Fixed submission (verdict: Accepted):
N = int(input())
T, A = (int(i) for i in input().split())
H = [int(i) for i in input().split()]

H_T = [0 for i in range(len(H))]
for i in range(len(H)):
    H_T[i] = float(T) - float(H[i])*0.006

min = 1000
index = 0
for i in range(len(H_T)):
    if(abs(H_T[i] - A) < min):
        index = i
        min = abs(H_T[i] - A)
print(index+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = map(int,input().split())
a *= 1000
t *= 1000
h = list(map(int,input().split()))

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

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1
1


Fixed submission (verdict: Accepted):
n = int(input())
t, a = map(int,input().split())
a *= 1000
t *= 1000
h = list(map(int,input().split()))

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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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(ans + 1)
Problem: p03220
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

n = int(input())


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

o = []

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


p = abs(a - h[0])

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

print(q + 1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):

n = int(input())


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

o = []

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


p = abs(a - o[0])

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

print(q + 1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = map(int, input().split())
Hs = map(int, input().split())
T_cal = [abs(T - H * 0.006 - A) for H in Hs]
print(T_cal)
print(T_cal.index(min(T_cal))+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1.0, 5.0]
1


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int, input().split())
Hs = map(int, input().split())
T_cal = [abs(T - H * 0.006 - A) for H in Hs]
print(T_cal.index(min(T_cal))+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b, c = map(int, input().split())
A = list(map(int, input().split()))
print(A)
tem = 0
st = 0
st2 = 0
for i in range(a):
    tem = c-(b-A[i]*0.006)
    tem = abs(tem)
    if i == 0:
        st = tem
    else:
        if st < tem:
            st = st
        else:
            st = tem
            st2 = i
print(st2+1)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1000, 2000]
1


Fixed submission (verdict: Accepted):
a = int(input())
b, c = map(int, input().split())
A = list(map(int, input().split()))
tem = 0
st = 0
st2 = 0
for i in range(a):
    tem = c-(b-A[i]*0.006)
    tem = abs(tem)
    if i == 0:
        st = tem
    else:
        if st < tem:
            st = st
        else:
            st = tem
            st2 = i
print(st2+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
mylist=[]

for i in range (N):
  C=12-H[i]*0.006
  D=A-C
  mylist.append(D)
E=mylist.index(max(mylist))
F=E+1
print(F)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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):
	dif=T-0.006*height_list[i]
	if abs(A-dif)<=val:
		val = abs(A-dif)
		site = i
print(site+1)

Problem: p03220
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
idx=0
m=100
for i in range(n):
    tmp=t-(h[i]*0.006)
    print(tmp)
    if abs(a-tmp)<m:
        idx=i
        m=abs(a-tmp)
print(idx+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
6.0
0.0
1


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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = map(int, input().split())
h = list(map(int, input().split()))
 
 
min = 10000
mini = 0
 
for i, x in enumerate(h):
  val = T - x*0.006
  gap = abs(A-val)
  if gap < min:
    min = gap
    mini = i
 
print(mini)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int, input().split())
h = list(map(int, input().split()))


min = 10000
mini = 0

for i, x in enumerate(h):
  val = T - x*0.006
  gap = abs(A-val)
  if gap < min:
    min = gap
    mini = i

print(mini+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t,a = map(int, input().split())
h = list(map(int, input().split()))
best = float("inf")
ind = 0
for i in range(n):
    temp = abs(a-(t- h[i]*0.006))
    print(temp)
    if temp < best:
        ind = i
        best = temp
print(ind+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1.0
5.0
1


Fixed submission (verdict: Accepted):
n = int(input())
t,a = map(int, input().split())
h = list(map(int, input().split()))
best = float("inf")
ind = 0
for i in range(n):
    temp = abs(a-(t- h[i]*0.006))
    if temp < best:
        ind = i
        best = temp
print(ind+1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
judge=10**18
for i,h in enumerate(H):
  if abs(a-(t-0.006*h)) < judge:
    ans=i
    judge=abs(a-(t-0.006*h))

print(ans)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
N=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
judge=10**18
for i,h in enumerate(H):
  if abs(a-(t-0.006*h)) < judge:
    ans=i+1
    judge=abs(a-(t-0.006*h))

print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
dif = t-a
ans = 0
for i in range(n):
  if t-a-0.006*h[i] < dif:
    ans = i+1
    dif = t-a-0.006*h[i]
print(ans)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
dif = abs(t-a - 0.006*h[0])
ans = 1
for i in range(1, n):
  if abs(t-a-0.006*h[i]) < dif:
    ans = i+1
    dif = abs(t-a-0.006*h[i])
print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t,a = map(int, input().split( ))
h = list(map(int, input().split( )))
ans=int(0)
c1 = int(0)
c2 = int(1000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.0006))
    c1 = abs(c1)
    if c1 <= c2:
        ans = i+1
    c2 = c1
print(ans)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
t,a = map(float, input().split( ))
h = list(map(float, input().split( )))
ans= float(0)
c1 = float(0)
c2 = float(100000000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.006))
    c1 = abs(c1)
    if c1 <= c2:
        ans = i+1
        c2 = c1
print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))

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

print(kion)

temp = sub.copy()
temp.sort()
index = sub.index(temp[0])

print(index+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[6, 0]
1


Fixed submission (verdict: Accepted):
n = int(input())
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))

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

temp = sub.copy()
temp.sort()
index = sub.index(temp[0])

print(index+1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
T_A = input().split()
T = int(T_A[0])
A = int(T_A[1])
H_list = list(map(int, input().split()))

i = 1
i_H_list = []
for H in H_list:
    ave_T = T - H * 0.006
    i_H_list.append([i, abs(A - ave_T)])
    i += 1

print(i_H_list)

min_diff = -1
min_diff_i = -1
for i in range(len(H_list)):
    if min_diff > i_H_list[i][1] or min_diff == -1:
        min_diff = i_H_list[i][1]
        min_diff_i = i_H_list[i][0]
print(min_diff_i)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[[1, 1.0], [2, 5.0]]
1


Fixed submission (verdict: Accepted):
N = input()
T_A = input().split()
T = int(T_A[0])
A = int(T_A[1])
H_list = list(map(int, input().split()))

i = 1
i_H_list = []
for H in H_list:
    ave_T = T - H * 0.006
    i_H_list.append([i, abs(A - ave_T)])
    i += 1

min_diff = -1
min_diff_i = -1
for i in range(len(H_list)):
    if min_diff > i_H_list[i][1] or min_diff == -1:
        min_diff = i_H_list[i][1]
        min_diff_i = i_H_list[i][0]
print(min_diff_i)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

min_diff = 100000
counter = 0
for i in range(N):
    diff = abs(A - T + H[i] * 0.006)
    if diff < min_diff:
        counter = i + 1

print(counter)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

min_diff = 100000
counter = 0
for i in range(N):
    diff = abs(A - T + H[i] * 0.006)
    if diff < min_diff:
        counter = i + 1
        min_diff = diff

print(counter)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
candidates = input()
T, A = map(int, input().split())
print(T,A)
heights = input().split()
print(heights)
ans = []
for i in range(len(heights)):
  ans.append(A - (T - int(heights[i])*0.006))
answer = ans.index(min(ans))
print(answer + 1)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
12 5
['1000', '2000']
1


Fixed submission (verdict: Accepted):
candidates = input()
T, A = map(int, input().split())
heights = input().split()
ans = []
for i in range(len(heights)):
    if T - int(heights[i])*0.006 >= A:
        ans.append((T - int(heights[i])*0.006) - A)
    else:
        ans.append(A - (T - int(heights[i])*0.006))
answer = ans.index(min(ans))
print(answer + 1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = map(int, input().split())
H = list(map(int, input().split()))
Y = []
for i in range(n):
    tmp = t - H[i]*0.006
    Y.append(abs(tmp-a))
miny = Y[0]
for item in Y:
    miny = min(miny, item)
print(Y)
res = Y.index(miny)
print(res+1)

    

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1.0, 5.0]
1


Fixed submission (verdict: Accepted):
n = int(input())
t, a = map(int, input().split())
H = list(map(int, input().split()))
Y = []
for i in range(n):
    tmp = t - H[i]*0.006
    Y.append(abs(tmp-a))
miny = Y[0]
for item in Y:
    miny = min(miny, item)
res = Y.index(miny)
print(res+1)

Problem: p03220
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
m = 1 
mindis = T-H[0]*0.006
for i in range(1,N):
  if mindis > T-H[i]*0.006:
    m = i+1
    mindis = T-H[i]*0.006
print(m)
        

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = map(int, (input().split(" ")))
H = list(map(int,input().split(" ")))
ans_t = 10000
ans = 0
for i in H:
  t = T - i * 0.006
  l = abs(A - T)
  if l < ans_t:
    ans_t = l
    ans = i
print(i)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2000


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int, (input().split(" ")))
H = list(map(int,input().split(" ")))
ans_t = 10000
ans = 0
 
for i in range(N):
  t = T - H[i] * 0.006
  l = abs(A - t)
  if l < ans_t:
    ans_t = l
    ans = i + 1
print(ans)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
print(H)
no=0
noabs=100000.0
for i in range(N):
    NT=T-H[i]*0.006
    if noabs>=abs(NT-T):
        no=i+1
        noabs=abs(NT-T)
print(no)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1000, 2000]
1


Fixed submission (verdict: Accepted):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
no=0
noabs=100000.0
for i in range(N):
    NT=T-H[i]*0.006
    if noabs>=abs(NT-A):
        no=i+1
        noabs=abs(NT-A)
print(no)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T,A = map(int,input().split())
Hs = list(map(int,input().split()))

diff_T = [abs(T-h*0.006-A) for h in Hs]
print(diff_T.index(min(diff_T)))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
T,A = map(int,input().split())
Hs = list(map(int,input().split()))

diff_T = [abs(T-h*0.006-A) for h in Hs]
print(diff_T.index(min(diff_T))+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
T,A=map(int,input().split())
H=[abs(A-(T-i*0.006)) for i in map(int,input().split())]
print(H)
print(H.index(min(H))+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1.0, 5.0]
1


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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
<generator object <genexpr> at 0x7fee2fe88e50>


Fixed submission (verdict: Accepted):
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(min(lisnew))+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))

l =[]
for i in range(n):
  a = T - h[i]*0.006
  print(a)
  b = abs(a-A)
  l.append(b)
  print(l)
c = l.index(min(l))
print(c+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
6.0
[1.0]
0.0
[1.0, 5.0]
1


Fixed submission (verdict: Accepted):
n = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))

l =[]
for i in range(n):
  a = T - h[i]*0.006
 
  b = abs(a-A)
  l.append(b)
  
c = h.index(h[l.index(min(l))])
print(c+1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = [int(x) for x in input().split()]
h = [int(x) for x in input().split()]
l = [(i, abs(a - (t - x * 0.0006))) for i, x in enumerate(h)]
target = min(l, key = lambda x: x[1])
print(target[0]+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
t, a = [int(x) for x in input().split()]
h = [int(x) for x in input().split()]
l = [(i, abs(a - (t - x * 0.006))) for i, x in enumerate(h)]
target = min(l, key = lambda x: x[1])
print(target[0]+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
dlist = []

for i in range(n):
    d = t - h[i] * 0.006 - a
    
    if d >= 0:
        dlist.append(d)
    else:
        d = -d
        dlist.append(d)
        
        
m = 0
for j in range(n):
    if dlist[j-1] <= dlist[j]:
        m = dlist[i-1]
        print('1')
    else:
        m = dlist[j]
        print('2')
print(dlist.index(m) + 1)
    

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2
1
1


Fixed submission (verdict: Accepted):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
dlist = []

for i in range(n):
    d = t - h[i] * 0.006 - a
    
    if d >= 0:
        dlist.append(d)
    else:
        d = -d
        dlist.append(d)
        
m = min(dlist)
        
print(dlist.index(m) + 1)

Problem: p03220
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
T,A=map(int,input().split())
mylist=list(map(int,input().split()))
mymin=10**6
index=0

for i in range(N):
  if(mymin>abs(A-(T-0.006*mylist[i]))):
    mymin=abs(A-(T-0.006*mylist[i]))
    index=i
print(index)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
N=int(input())
T,A=map(int,input().split())
mylist=list(map(int,input().split()))
mymin=10**6
index=0

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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T, A = map(int, input().split())
H_list = list(map(int, input().split()))
min_err = 10000
num = -1
for i in range(N):
    temperture = T-H_list[i]*0.006
    err = abs(A - temperture)
    print(err)
    if err < min_err:
        min_err = err
        num = i
print(num+1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1.0
5.0
1


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int, input().split())
H_list = list(map(int, input().split()))
min_err = 10000
num = -1
for i in range(N):
    temperture = T-H_list[i]*0.006
    err = abs(A - temperture)
    if err < min_err:
        min_err = err
        num = i
print(num+1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
print(min([(abs(a-t+h[i]*0.006),i)for i in range(n)])[1])

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
print(min([(abs(a-t+h[i]*0.006),i)for i in range(n)])[1]+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())
t, a = [int(s) for s in input().split()]
h = [int(s) for s in input().split()]
difference = [abs(a - (t - i * 0.006)) for i in h]

print(h, difference)
print(difference.index(min(difference)) + 1)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1000, 2000] [1.0, 5.0]
1


Fixed submission (verdict: Accepted):

n = int(input())
t, a = [int(s) for s in input().split()]
h = [int(s) for s in input().split()]
difference = [abs(a - (t - i * 0.006)) for i in h]

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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t,a = map(float, input().split( ))
h = list(map(float, input().split( )))
ans= float(0)
c1 = float(0)
c2 = float(1000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.0006))
    c1 = abs(c1)
    if c1 <= c2:
        ans = i+1
    c2 = c1
print(ans)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
t,a = map(float, input().split( ))
h = list(map(float, input().split( )))
ans= float(0)
c1 = float(0)
c2 = float(100000000000000)
for i in range(n):
    c1 = a-(t-(h[i]*0.006))
    c1 = abs(c1)
    if c1 <= c2:
        ans = i+1
        c2 = c1
print(ans)

Problem: p03220
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans = 0
m = A
for i in range(N):
  if m > T - H[i] * 0.006:
    m = T - H[i] * 0.006
    ans = i + 1
print(ans)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
ans = 0
m = A + 1000
for i in range(N):
  d = abs(T - H[i] * 0.006 - A)
  if m > d:
    m = d
    ans = i + 1
print(ans)

Problem: p03220
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

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

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
1.0


Fixed submission (verdict: Accepted):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

index = 0
ans = 10**10
for i in range(N):
  tmp = T - 0.006*H[i]
  if ans > abs(A-tmp):
    ans = abs(A-tmp)
    index = i+1
print(index)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = input().split(' ')
t = int(t)
a = int(a)
h = input().split(' ')

diff = 100
point = 10000

for x in range(n):
    tmp = t - int(h[x]) * 0.006 
    if tmp < diff:
        diff = tmp
        point = x + 1

print(point)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
t, a = input().split(' ')
t = int(t)
a = int(a)
h = input().split(' ')

diff = 10000
point = 10000

for x in range(n):
    temp = t - int(h[x]) * 0.006
    tmp = abs(a - temp)

    if tmp < diff:
        diff = tmp
        point = x + 1

print(point)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
T,A=map(int, input().split())
list=list(map(int, input().split()))
l_b=[]
d=0
c=0
for i in range(N):
  d=A-(T-list[i]*0.006)
  if d<0:
    d=-d
  l_b.append(d)
print(l_b.index(min(l_b)))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
N=int(input())
T,A=map(int, input().split())
list=list(map(int, input().split()))
l_b=[]
d=0
for i in range(N):
  d=A-(T-list[i]*0.006)
  if d<0:
    d=-d
  l_b.append(d)
print(l_b.index(min(l_b))+1)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve():
    N = int(input())
    T, A = map(int, input().split())
    H = map(int, input().split())
    ans = float('inf')
    ans_i = 0
    for i, v in enumerate(H):
        tmp = abs(A - (T - 0.006 * v))
        print(A, T, v, T-v*0.006)
        if ans > tmp:
            ans_i = i
            ans = tmp
    print(ans_i+1)

if __name__ == '__main__':
    solve()


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
5 12 1000 6.0
5 12 2000 0.0
1


Fixed submission (verdict: Accepted):
def solve():
    N = int(input())
    T, A = map(int, input().split())
    H = map(int, input().split())
    ans = float('inf')
    ans_i = 0
    for i, v in enumerate(H):
        tmp = abs(A - (T - 0.006 * v))
        if ans > tmp:
            ans_i = i
            ans = tmp
    print(ans_i+1)

if __name__ == '__main__':
    solve()
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ave_temp(temp, height):
	return temp - (height * 0.006)

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

ans = []
A_raw = []
built = []
for i in range(0, N):
	ans.append(ave_temp(T, H[i]))
	A_raw.append(A)
	built.append(abs(abs(ans[i]) - abs(A_raw[i])))

print(built)

for k in range(0, N):
	built_num = 0
	if built[built_num] > built[built_num + k]:
		built_num = k

print(str(built_num + 1))



Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1.0, 5.0]
1


Fixed submission (verdict: Accepted):

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

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

ans = []
A_raw = []
built = []
for i in range(0, N):
	ans.append(ave_temp(T, H[i]))
	A_raw.append(A)
	built.append(abs(ans[i] - A_raw[i]))



index = 0

a = min(built)

for k in range(0, N):
	if a == built[k]:
		built_num = k
	

print(str(built_num + 1))

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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]
print(tem_gap)

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

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
[1.0, 5.0]
1


Fixed submission (verdict: Accepted):
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)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
t, a = map(int, input().split())
y = 0

h = list(map(int, input().split()))
def comp(a,b,c):
  if abs(a-c) >= abs(b-c):
    return a
  else:
    return b
for i in range(n):
  x = t - (h[i] * 0.006)
  
  if y ==0:
    y=x
  else:
    y=comp(x,y,a)
    z=i+1
print(z)

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
t, a = map(int, input().split())
y = 0
z = 0

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

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

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
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 - H[i] * 0.006 - A)

print(ans.index(min(ans)) + 1)
Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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()


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
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+1)
    sys.exit()

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
T,A = list(map(int, input().split()))
H = list(map(int, input().split()))
ansx=100000000000
for i in range(N):
    subans=T-H[i]*0.006
    print(subans)
    if abs(A-subans)<=abs(ansx):
        ansx=subans
        ans=i+1
print(ans)


Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
6.0
0.0
2


Fixed submission (verdict: Accepted):
N = int(input())
T,A = list(map(int, input().split()))
H = list(map(int, input().split()))
ansx=T-H[0]*0.006
ans=1
for i in range(N):
    subans=T-H[i]*0.006
    if abs(A-subans)<abs(A-ansx):
        ansx=subans
        ans=i+1
print(ans)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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)



Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
2 12 5
[1000, 2000]
0 1000
1 2000
2


Fixed submission (verdict: Accepted):

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)

Problem: p03220
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)))

Failing test case input:
2
12 5
1000 2000

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
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))+1)