TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
def main():
    n = int(input())
    t, a = list(map(float, input().split(' ')))

    min_diff = 100000000000000000000000000
    min_index = -1
    hs = list(map(float, input().split(' ')))
    for i in range(n):
        h = hs[i]
        cu_diff = abs(a - (t - h * 0.006))
        print(cu_diff)
        if cu_diff < min_diff:
            min_diff = cu_diff
            min_index = i

    print(min_index+1)

if __name__ == '__main__':
    main()


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

    min_diff = 100000000000000000000000000
    min_index = -1
    hs = list(map(float, input().split(' ')))
    for i in range(n):
        h = hs[i]
        cu_diff = abs(a - (t - h * 0.006))
        if cu_diff < min_diff:
            min_diff = cu_diff
            min_index = i

    print(min_index+1)

if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)


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


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)

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)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
u = []

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

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
t,a=[int(i) for i in input().split()]
H=[int(i) for i in input().split()]
T=[]
for i in H:
  ti=abs(t-i*0.006-a)
  T.append(ti)
m=min(T)
i=T.index(m)
print(i)


n=int(input())
t,a=[int(i) for i in input().split()]
H=[int(i) for i in input().split()]
T=[]
for i in H:
  ti=abs(t-i*0.006-a)
  T.append(ti)
m=min(T)
i=T.index(m)
print(i+1)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))

a_meter = (12-A*1000)//6

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

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

a_meter = (12-A*1000)//6

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)

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)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int(input().split()))
h = list(map(int,input().split()))
deg = 11451419
for i in range(n):
  if deg > abs(a - h[i]*0.006):
    deg = abs(a - h[i]*0.006)
    ans = i+1
print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))

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

print(ans+1)

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

ans = 0
anstemp = 2**20
temp = 0
for i in range(len(H)):
	temp = T - H[i] * 0.006
	if abs(temp - A) <= abs(anstemp - A):
		ans = i
		anstemp = temp

print(ans+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
for i in range(n):
  temp = 12 - h[i]*0.006
  k = abs(a-temp)
  if i == 0:
    ans = i+1
  else:
    if k>temp:
      ans = i+1
print(ans)
      

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
b = [abs(a - (t - i * 0.006)) for i in list(map(int, input().split()))]
print(min(b))


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


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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import math
N = int(input())
T, A = list(map(int, input().split()))
Hn = list(map(int, input().split()))

mtemp = math.fabs(A - (T - Hn[0] * 0.006))
midx = 0
for idx, v in enumerate(Hn):
    print(idx)
    print(v)
    tmp = math.fabs(A - (T - v * 0.006))
    if tmp < mtemp:
        mtemp = tmp
        midx = idx

print(midx + 1)

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

mtemp = math.fabs(A - (T - Hn[0] * 0.006))
midx = 0
for idx, v in enumerate(Hn):
    tmp = math.fabs(A - (T - v * 0.006))
    if tmp < mtemp:
        mtemp = tmp
        midx = idx

print(midx + 1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=input()
t,a=map(int,input().split())
h=list(map(int,input()))
h2=[abs(t-x*0.006) for x in h]
print(h2.index(min(h2))+1)
    
    

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

n=input()
t,a=map(int,input().split())
h=list(map(int,input()))
h2=[t-x*0.006 for x in h]
print(h2.index(min(h2))+1)
    
    

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input().split())
l = list(map(int, input().split()))
deltatemperature = []

for height in l:
  deltatemperature.append(abs(T- height* 0.006- A))
  
m = min(deltatemperature)
mindex = l.index(m)
print(mindex+ 1)

N = int(input())
T, A = map(int, input().split())
l = list(map(int, input().split()))
deltatemperature = []

for height in l:
  deltatemperature.append(abs(T- height* 0.006- A))
  
m = min(deltatemperature)
mindex = deltatemperature.index(m)
print(mindex+ 1)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A  = map(int, input().split())
hight_list = list(map(int, input().split()))

ans = 10000
ans_ind

for i in range(N):
  temp = T - 0.006 * hight_list[i]
  diff = abs(temp - A)
  if  diff < ans:
    ans = diff
    ans_ind = i
    
print(i+1)
    
  

N = int(input())
T, A  = map(int, input().split())
hight_list = list(map(int, input().split()))
 
ans = 10000
ans_ind = 0
 
for i in range(N):
  temp = T - 0.006 * hight_list[i]
  diff = abs(temp - A)
  if  diff < ans:
    ans = diff
    ans_ind = i
    
print(ans_ind+1)
    

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
temp = [abs(1000*T - x - A) for x in H]
m = min(temp)
i = temp.index(m)
print(i+1)

ソースコード
N=int(input())
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
temp = [abs(1000*T - 6*x - 1000*A) for x in H]
m = min(temp)
i = temp.index(m)
print(i+1)

N=int(input())
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
temp = [abs(1000*T - 6*x - 1000*A) for x in H]
m = min(temp)
i = temp.index(m)
print(i+1)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
m = float("INF")
num = 0
for i in range(n):
    if abs(t - h[i] * 0.006) < m:
        num = i
        m = abs(t - h[i] * 0.006)

print(num + 1)

n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
m = float("INF")
num = 0
for i in range(n):
    if abs(t - h[i] * 0.006 - a) < m:
        num = i
        m = abs(t - h[i] * 0.006 - a)

print(num + 1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from math import fabs

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

from math import fabs

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

main()

from math import fabs

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)


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)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

import sys
input = sys.stdin.readline

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

ans = 1
min_tmp = 1000

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

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np
N = int(input())
T,A = input().split()

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

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

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

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

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

H = input().split()

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np

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

gap = 1000000000000000000000

H = np.asarray(H)

Tem = T-H*0.006

for i in range(N):
    if abs(H[i]-A)<gap:
        palace = i+1

print(palace)


import numpy as np

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

gap = 1000000000000000000000

H = np.asarray(H)

Tem = T-H*0.006

for i in range(N):

    if abs(Tem[i]-A)<gap:
        gap = abs(Tem[i]-A)
        palace = i+1

print(palace)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)


n = int(input())
x, y = map(int, input().split())
h_list = list(map(int, input().split()))

min_diff = 9999999999
min_index = 0
for i, h in enumerate(h_list):
    diff = abs(y - (x - h * 0.006))
    if min_diff > diff:
        min_diff = diff
        min_index = i

print(min_index + 1)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = input()
T,A = map(int,input().split(" "))
h = input().split(" ")
H_ = [abs(T-0.006*int(k)-A) for k in h]
print(argmin(H_)+1)

N = int("2")
T,A = map(int,"12 5".split(" "))
h = "1000 2000".split(" ")
H_ = [abs(T-0.006*int(k)-A) for k in h]

m = float("inf")
arg = 0
for i in range(N):
  if H_[i] < m:
    arg = i+1
    m = H[i]

print(arg)

  
  

N = input()
T,A = map(int,input().split(" ")
h = input().split(" ")
H_ = [abs(T-0.006*int(k)-A) for k in h]
print(argmin(H_)+1)
          


          

N = int(input())
T,A = map(int,input().split(" "))
h = input().split(" ")
H_ = [abs(T-0.006*int(k)-A) for k in h]
 
m = float("inf")
arg = 0
for i in range(N):
  if H_[i] < m:
    arg = i+1
    m = H[i]
 
print(arg)

N = int(input())
T,A = map(int,input().split(" "))
h = input().split(" ")
H_ = [abs(T-0.006*int(k)-A) for k in h]
     
m = float("inf")
arg = 0
for i in range(N):
  if H_[i] < m:
    arg = i+1
    m = H_[i]
     
print(arg)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

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


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



Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
ans = []
for i in range(n):
  ans.append(abs((t-h[i]*0.06)-a))
print(a.index(min(a))+1)
  

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


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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
def abs(k,l):
  if k>l:
    return k-l
  else:
    return l-k  
b=20000313
cnt=0
for i in range(n):
  if b>abs(a,t-0.006*h[i]):
    b=t-0.006*h[i]
    cnt=i
  else:
    b=b
    cnt=cnt
print(cnt+1)

  
  
  


n=int(input())
t,a=map(int,inout().split())
h=list(map(int,input().split()))
def abs(k,l):
  if k>l:
    return k-l
  else:
    return l-k  
b=20000313
cnt=0
for i in range(n):
  if b>abs(a,t-0.006*h[i]):
    b=t-0.006*h[i]
    cnt=i
  else:
    b=b
    cnt=cnt
print(cnt+1)

  
  
  

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
def abs(k,l):
  if k>l:
    return k-l
  else:
    return l-k  
b=20000313
cnt=0
for i in range(n):
  if b>abs(a,t-0.006*h[i]):
    b=abs(a,t-0.006*h[i])
    cnt=i
  else:
    b=b
    cnt=cnt
print(cnt+1)

  
  
  


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T , A = (int(i) for i in input().split())
H_list = [int(h) for h in input().split()]
 
A_list = [abs((T-0.006*H_list[n])-A) for n in range(N)]

number = 0
for n ,x in enumerate(A_list):
  if x == min(A_list):
    number = n
print(number)

N = int(input())
T , A = (int(i) for i in input().split())
H_list = [int(h) for h in input().split()]

number = min([abs((T-0.006*H_list[n])-A) for n in range(N)])
print(number)
  

N = int(input())
T , A = (int(i) for i in input().split())
H_list = [int(h) for h in input().split()]
 
A_list = [abs((T-0.006*H_list[n])-A) for n in range(N)]

for n ,x in enumerate(A_list):
  if x == min(A_list):
    number == n
print(n)

N = int(input())
T , A = (int(i) for i in input().split())
H_list = [int(h) for h in input().split()]
 
A_list = [abs((T-0.006*H_list[n])-A) for n in range(N)]
 
number = 0
for n ,x in enumerate(A_list):
    if x == min(A_list):
        number = n+1
print(number)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)))

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


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)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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) 

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) 

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

lst=[]

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int,input().split(" "))
temp = []
for i in range(N):
  temp.append(map(int,input().split(" ")))
j = 0
k = 0
flag = 0
s = []
while j < N:
  k = T - (0.006)*temp[j]
    if k >= A:
      s.append(k - A)
    else:
      s.append(A - k)
  if s[j] <= s[flag]:
    flag = j
  j = j + 1
print(j)

N = int(input())
T,A = map(int,input().split(" "))
temp = []
for i in range(N):
  temp.append(map(int,input().split(" ")))
j = 0
k = 0
flag = 0
s = []
while j < N:
  k = T - (0.006)*temp[j]
  if k >= A:
    s.append(k - A)
  else:
    s.append(A - k)
  if s[j] <= s[flag]:
    flag = j
  j = j + 1
print(flag)

N = int(input())
T,A = map(int,input().split(" "))
H = list(map(int,input().split(" ")))
j = 0
k = 0
flag = 0
s = []
while j < N:
  k = T - (0.006)*H[j]
  if k >= A:
    s.append(k - A)
  else:
    s.append(A - k)
  if s[j] <= s[flag]:
    flag = j
  j = j + 1
print(flag+1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input)
T,A = map(int,input().split())
H = list(map(int,input().split()))
B = list(range(N))
def Temp(x):
  Temp = T-0.006*x
  return(Temp)
for i in range(N):
  B[i] = abs(Temp(H[i])-A)
ans = min(B)
print(B.index(ans)+1)

N = int(input())
T,A = map(int,input())
H = list(map(int,input()))
B = list(range(N))
def Temp(x):
  Temp = T-0.006*x
  return(Temp)
for i in range(N):
  B[i] = abs(Temp(H[i])-A)
ans = min(B)
print(B.index(ans)+1)

N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
B = list(range(N))
def Temp(x):
  Temp = T-0.006*x
  return(Temp)
for i in range(N):
  B[i] = abs(Temp(H[i])-A)
ans = min(B)
print(B.index(ans)+1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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]*0.006)
print(h.index(min(h))+1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)))

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)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
min=10000 
ans=0

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

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
min=10000 
ans=0

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
judge = abs(A - (T - 0.006*H[0]))
k = 0

for i in range(N):
  a = abs(A - (T - 0.006*H[i]))
  if judge > a:
    judge = a
    k = i
    
print(k)


N = int(input())
T,A = map(int, input().split())
H = list[input()]
judge = abs(A - (T - 0.006*H[0]))
k = 0

for i in range(N):
  a = abs(A - (T - 0.006*H[i]))
  if judge > a:
    judge = a
    k = i
    
print(k)

N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
judge = abs(A - (T - 0.006*H[0]))
k = 0

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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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()


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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
t, a = map(int, input().split())
hl = list(map(int, input().split()))
count = 1
ss = 1000000000
ans = 0
for h in hl:
    if t-h*0.006-a >= 0:
        if float(t-h*0.006-a) < ss:
            ans = count
            count+=1
        else:
            count+=1
    else:
        if float(-t+h*0.006+a) > -ss:
            ans = count
            count+=1
            count+=1
        else:

print(ans)


n = int(input())
t, a = map(int, input().split())
hl = list(map(int, input().split()))
count = 1
ss = 1000000000
ans = 0
for h in hl:
    if t-h*0.006-a >= 0:
        if float(t-h*0.006-a) < ss:
            ans = count
            count+=1
        else:
            count+=1
    else:
        if float(-t+h*0.006+a) > -ss:
            ans = count
            count+=1
        else:
            count+=1

print(ans)


n = int(input())
t, a = map(int, input().split())
hl = list(map(int, input().split()))
ll = [t-h*0.006-a for h in hl]
ans = 1
dd = 1000000000
for i in range(n):
    if ll[i] >= 0 and ll[i] < dd:
        ans = i+1
        dd = ll[i]
    elif ll[i] < 0 and -ll[i] < dd:
        ans = i+1
        dd = -ll[i]
    else:
        pass

print(ans)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
M = 1000
ans =  1
for i in range(N):
  K = abs(A-(T-((int(H[i]))*0.006)))
  if K<M:
      ans = i+1
print(ans)


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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
T, A = map(int, input.split())
H = list(map(int, input.split()))

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num)


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

num = 0
for i in range(0, N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num)

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

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num+1)


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

num = 0
for i in range(N):
  deff = abs(T-H[i]*0.006-A)
  if deff < abs(T-H[num]*0.006-A):
    num = i

print(num+1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted