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):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    t,a=map(int, input().split())
    h=list(map(int,input().split()))
    ans=n+1
    minabs=10**18
    for i in range(n):
        tempabs=abs(a-(t-h[i]*0.006))
        if tempabs<minabs:
            minabs=tempabs
            ans=i+1
    print(ans)


import sys
def input(): return sys.stdin.readline().strip()

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

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 = list(map(int, input().split()))
h = list(map(int, input().split()))
h = [abs(a - (t - i*.006)) for i in h]

mins = h[0]
index = 0
for i in range(1, n):
  if h[i] < mins:
    mins = h[i]
    index = i
    
print((i+1))

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

h = [  abs(a - (t - i*.006)) for i in h]

mins = h[0]
index = 0
print(h)
for i in range(1, n):
  if h[i] < mins:
    mins = h[i]
    index = i
    
print((index+1))

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

h = [  abs(a - (t - i*.006)) for i in h]

mins = h[0]
index = 0
for i in range(1, n):
  if h[i] < mins:
    mins = h[i]
    index = i
    
print((index+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())
H=[int(i) for i in input().split()]
ans=0
que=T-H[0]
for i in range(1,N):
    temp=T-0.006*H[i]
    if abs(A-que)>abs(A-temp):
        que=temp
        ans=i
print(ans+1)

N=int(input())
T,A=map(int,input().split())
H=[int(i) for i in input().split()]
ans=0
que=T-0.006*H[0]
for i in range(1,N):
    temp=T-0.006*H[i]
    if abs(A-que)>abs(A-temp):
        que=temp
        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):
N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))
sa = [abs(T-0.006*H[i] - A) for i in range(N)]
print(sa.index(min(sa))+1)N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))
sa = [abs(T-0.006*H[i] - A) for i in range(N)]
print(sa.index(min(sa))+1)

N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))
sa = [abs(T-0.006*H[i] - A) for i in range(N)]
print(sa.index(min(sa))+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()))

print(H)

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

for k in range(N):
    H[k] = abs(H[k] - abs(A))
print(H)

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

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



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


for k in range(N):
    H[k] = abs(H[k] - (A))


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().suplit())
h=list(input().suplit())
b=1
c=abs(t-h[0]*0.006-a)
for i in n :
  if(abs(t-h[i]*0.006-a)<c):
    b=i+1
    c=abs(t-h[i]*0.006-a)
  else:
    continue
print(b)  

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
b=1
c=abs(t-h[0]*0.006-a)
for i in range(n) :
  if(abs(t-h[i]*0.006-a)<c):
    b=i+1
    c=abs(t-h[i]*0.006-a)
  else:
    continue
print(b)


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

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)

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 = [int(i) for i in input().split()]
a = []
ans = 0
saitekionndo = 1000000000000
for i in range(n):
    a.append([abs((T-H[i]*0.006)-A)])
    if abs((T-H[i]*0.006)-A)<saitekionndo:
        ans = i+1
print(ans)

n = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
a = []
ans = 0
saitekionndo = 1000000000000
for i in range(n):
    a.append([abs((T-H[i]*0.006)-A)])
    if abs((T-H[i]*0.006)-A)<saitekionndo:
        saitekionndo = abs((T-H[i]*0.006)-A)
        ans = i+1
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):
#my_answer
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))#N times
#print(H)
#temp=T-x*0.006
temp=[0]*N
gap=[0]*N

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

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





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

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

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





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

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

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





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 = list(map(int, input().split()))
H = list(map(int, input().split()))
list = []
for i in H:
    list.append(T - i * 0.006)
for i in range(len(list)):
    list[i] = A - list[i]
print(list)
print(list.index((min(list))) + 1)


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
    H[i] = abs(A - temp)

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())
x = list(map(int, input().split()))
h = list(map(int, input().split()))

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


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

t = x[0]
a = x[1]
cnt = 1000000000000000000000
ans = 0
for i in range(n):
  tmp = abs(t-(h[i]*0.006)-a)
  if cnt > tmp:
    cnt = tmp
    ans = i+1
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())
array = list(map(int, input().split()))

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

print(ans)

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

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

print(ans)

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

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

print(ans)

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

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

temp = []
for i in e:
    temp.append(abs(t - i * 0.006 - a))
    
print(e)
print(temp)
print(temp.index(min(temp)) + 1)




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

N = int(input())
T, A = map(int, input().split())
diff =50000000
num = 0
for i in range(N):
    H = int(input())
    if abs(T - H*0.006 - A) < diff:
        num = i + 1

N = int(input())
T, A = map(int, input().split())
diff =50000000
num = 0
for i in range(1,N+1):
    H = int(input())
    if abs(T - H*0.006 - A) < diff:
        num = i

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

temp = []
for i in e:
    temp.append(abs(t - i * 0.006 - a))
    
print(temp.index(min(temp)) + 1)



Verdicts: Runtime Error

Wrong Answer

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):
import numpy as np
N = int(input())
T,A = map(int, input().split())
H = np.array(list(map(int, input().split())))
H = T - 0.006*H - A
H = np.abs(H)
print(np.argmin(H))

import numpy as np
N = int(input())
T,A = map(int, input().split())
H = np.array(list(map(int, input().split())))
meanx = (T - A)/0.006
H = H - meanx
H = np.abs(H)
print(np.argmin(H))

#Palace
N,T,A,*H = map(int,open(0).read().split())
A = [A]*N
for i in range (N):
    H[i] = abs((T-H[i]*0.006)-A[i])
print(H.index(min(H)+1)+1)


N = int(input())
T,A = map(int, input().split())
H = list(map(int, input().split()))
meanx = (T - A)/0.006
H = H - meanx
print(index(min(H)))

#Palace
N,T,A,*H = map(int,open(0).read().split())
A = [A]*N
for i in range (N):
    H[i] = abs((T-H[i]*0.006)-A[i])
print(H.index(min(H)+1)+1)

#Palace
N,T,A,*H = map(int,open(0).read().split())
A = [A]*N
for i in range (N):
    H[i] = abs((T-H[i]*0.006)-A[i])
print(H.index(min(H)+1)+1)

import numpy as np
N = int(input())
T,A = map(int, input().split())
H = np.array(list(map(int, input().split())))
H = T - 0.006*H - A
H = np.abs(H)
print(np.argmin(H) + 1)

Verdicts: Wrong Answer

Wrong Answer

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 = [int(n) for n in input().split()]

min_t = T
min_i = 0

for i in range(N):
    t = abs(A - (T - H[i]*0.006))
    if t <= min_t:
        min_t = t
        min_i = i


print(min_i)


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

min_t = 10**5
min_i = 0

for i in range(N):
    t = abs(A - (T - H[i]*0.006))
    if t <= min_t:
        min_t = t
        min_i = i


print(min_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()))
ans = float('inf')
for h in H:
  if abs(t-ans*0.006) > abs(t-ans*0.006):
    ans = h
print(H.index(ans)+1)

n = int(input())
t,a = map(int,input().split())
H = list(map(int,input().split()))
ans = float('inf')
for h in H:
  if abs(a-(t-ans*0.006)) > abs(a-(t-h*0.006)):
    ans = h
print(H.index(ans)+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())
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)

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


nums = map(int, input().split(" "))

xxx = map(lambda x: abs(a-t-0.006*x), nums)

m = min(xxx)

for i, v in xxx.enumerate:
    if m == v:
        print(i)


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
    if abs(a-tmp) < min:
        ans = i

print(i+1)


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
    if abs(a-tmp) < min:
        ans = i
        min = abs(a-tmp)

print(i+1)


n = int(input())
t, a = map(int, input().split())
places = map(int, [input() for _ in range(n)]

k = places.map(lambda x: abs(a - t - (H * 0.006)) // が最小となるindex
    

target = enumerate(k)        
ans = (0, 99999)

for i in target:
    if i[1] < ans[1]:
        ans = i

print(i[0])

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


nums = map(int, input().split(" "))

xxx = map(lambda x: abs(a-t-0.006*x), nums)

m = min(xxx)

for i, v in xxx.enumerete:
    if m == v:
        print(i)


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
    if abs(a-tmp) < min:
        ans = i
        min = abs(a-tmp)


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)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

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())
beta = 0.006
H = list(map(int,input().split()))
import numpy as np 
H = np.array(H) 
use = t - beta * H - a 
use = use**2 
pre_answer = min(use) 
ans = 1 + use.index(pre_answer) 
print(ans)

n = int(input())
t, a = map(int,input().split())
beta = 0.006
H = list(map(int,input().split()))
import numpy as np 
H = np.array(H) 
use = t - beta * H - a 
use = use**2 
pre_answer = min(use)
use = list(use) 
ans = 1 + use.index(pre_answer) 
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()))
tmin = 10000000
for i in range(N):
  if tmin < (T - H[i] * 0.006):
    ans = i+1
    tmin = T - H[i] * 0.006
print(ans)
    

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

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

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



Verdicts: Runtime Error

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 = [abs((t - int(i) * 0.0006) - a) for i in input().split(' ')]
print(h.index(min(h))+1)

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)

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()))
B = abs(A-(T-0.006*H[0]))
for i in range(N):
    C = abs(A-(T-0.006*H[i]))
    if B>C:
        B = C
        ans = i+1
print(ans)


N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
B = abs(A-(T-0.006*H[0]))
for i in range(N):
    C = abs(A-(T-0.006*H[i]))
    if B>=C:
        B = C
        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()))

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

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

tmp = 10000000
for i in range(N):
  if tmp >= abs(A - (T - (H[i] * 0.006))):
    tmp = abs(A - (T - (H[i] * 0.006)))
    ans = i + 1
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 = list(map(int,input().split())) 
H = list(map(int,input().split()))

tmp = 10**10
index = 1

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

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

l = []

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

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())
List = list(map(int, input().split()))
t = 0
mid = 0
MID = 100000000000
res = 100000000000
for i in range(N):
  t = T - 0.006*List[i]
  mid = abs(A-t)
  if mid < MID:
    MID = mid
    res = i+1
print(i+1)

N = int(input())
T,A=map(int,input().split())
List = list(map(int, input().split()))
t = 0
mid = 0
MID = 100000000000
res = 100000000000
for i in range(N):
  t = T - 0.006*List[i]
  mid = abs(A-t)
  if mid < MID:
    MID = mid
    res = i+1
print(res)

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()))
Hans = (T-A)/6*1000
ind = -1
dis = 10**5
for i in range(len(H)):
  if dis > abs(Hans - H[i]):
    dis = abs(Hans - H[i])
    ind = i
print(i+1)

N=int(input())
T,A=map(int,input().split())
H = list(map(int,input().split()))
ind = -1
dis = 10**5
for i in range(len(H)):
  dx = abs(A - (T-H[i]*0.006))
  if dis > dx:
    dis = dx
    ind = i
print(i+1)

N=int(input())
T,A=map(int,input().split())
H = list(map(int,input().split()))
ind = -1
dis = 10**5
for i in range(len(H)):
  dx = abs(A - (T-H[i]*0.006))
  if dis > dx:
    dis = dx
    ind = i
print(ind+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())
H = list(map(int,input().split()))

tmp = 1000
ans = 0
for i in range(len(H)):
    tmp_ = abs(A-(T-H[i]*0.006))
    print(tmp,tmp_)
    if tmp_<tmp:
        ans = i
        tmp = tmp_
print(ans+1)


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

tmp = 1000
ans = 0
for i in range(len(H)):
    tmp_ = abs(A-(T-H[i]*0.006))
    if tmp_<tmp:
        ans = i
        tmp = tmp_
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()))
diff=1000000
ans=-1
for i in range(n):
    ave=t-(h[i]*0.006)
    tmp=a-ave
    if tmp < 0:
        tmp*=-1
    if diff > tmp:
        diff=tmp
        ans=i+1
print(ans)p

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
diff=float('INF')
ans=-1
for i in range(n):
    ave=t-(h[i]*0.006)
    tmp=a-ave
    if tmp < 0:
        tmp*=-1
    if diff > tmp:
        diff=tmp
        ans=i+1
print(ans)p

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
diff=1000000
for i in range(n):
    ave=t-(h[i]*0.006)
    tmp=a-ave
    if tmp < 0:
        tmp*=-1
    if diff > tmp:
        diff=tmp
        ans=i+1
print(ans)

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,t,a=int(input()),map(int,input().split())
h=list(map(int,input().split()))
print(min(h).index()+1)

n=int(input()),
t,a=map(int,input().split())
h=list(map(int,input().split()))
x=[abs(a-t+0.006*i) for i in h]
print(x.index(min(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()))
         
K = []
Ksorted=[]
tmp=[]

for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T + 1)

N = int(input())
T, A = map( int, input().split())
H = list( map( int, input.split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T+1)


N = int(input())
T, A = map( int, input().split())
H = list( map( int, input().split()))
         
K = []
Ksorted=[]
tmp=[]
 
for i in range(N):
  tmp.append( T - H[i] * 0.006)
  K.append(abs( A - tmp[i]))
  Ksorted = sorted(K)
  
T = K.index(Ksorted[0])
print(T+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()))

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)

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)

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

place = 1
closest = abs(T - H[0]*0.006)

for i in range(1,N):
    if abs(T-H[i]*0.006) < closest:
        place = i + 1

print(place)

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

place = 1
closest = abs(T - H[0]*0.006)

for i in range(1,N):
    temperature = abs(T-H[i]*0.006)
    if temperature < closest:
        place = i + 1
        closest = temperature

print(place)

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

place = 1
closest = abs(A - (T - H[0]*0.006))

for i in range(1,N):
    temperature = abs(A - (T - H[i]*0.006))
    if temperature < closest:
        place = i + 1
        closest = temperature

print(place)

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())
list = input().split()
T = list[0]
A = list[1]
print('Tは{}'.format(T))
print('Aは{}'.format(A))
list2 = input().split()
H = []
T_mean = []
minimum = []
for i in range(N):
    H.append(list2[i])
    T_mean.append(int(T)-int(H[i])*0.006)
    minimum.append(abs(T_mean[i] - int(A)))


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

N = int(input())
list = input().split()
T = list[0]
A = list[1]
list2 = input().split()
H = []
T_mean = []
minimum = []
for i in range(N):
    H.append(list2[i])
    T_mean.append(int(T)-int(H[i])*0.006)
    minimum.append(abs(T_mean[i] - int(A)))


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

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

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)


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)


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())
s = [abs(A - (T - 0.006 * x)) for x in map(int, input().split())]
print(s.index(min(s) + 1))

N = int(input())
T, A = map(int, input().split())
s = [abs(A - (T - 0.006 * x)) for x in map(int, input().split())]
print(s.index(min(s))+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()))

ans_num = 1
ans_para = h[0]
for i, r in enumerate(h):
    deg = t - (r * 0.006)
    ans_para_deg = t - (ans_para * 0.006)
    if abs(a - ans_para_deg) >= abs(a - deg):
        ans_para = r
        ans_num = i+1
print(ans_num

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

ans_num = 1
ans_para = h[0]
for i, r in enumerate(h):
    deg = t - (r * 0.006)
    ans_para_deg = t - (ans_para * 0.006)
    if abs(a - ans_para_deg) >= abs(a - deg):
        ans_para = r
        ans_num = i+1
print(ans_num)

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

def datain(num):

    data = []
    iscnt = True

    while iscnt:
        for val in map(int,input().split()):
            data.append(val)
            if len(data) == num:
                iscnt = False
                break
        
    return data

data = datain(int(input())+2)

ans = 0
temp = [abs(data[1]-(data[0]-0.006*temp)) for temp in data[2:]]
print(temp)

for i,val in enumerate(temp):
    if temp[ans] > val:
        ans = i

print(ans+1)


def datain(num):

    data = []
    iscnt = True

    while iscnt:
        for val in map(int,input().split()):
            data.append(val)
            if len(data) == num:
                iscnt = False
                break
        
    return data

data = datain(int(input())+2)

minval = 1000000
ans = 0
temp = [abs(data[1]-(data[0]-0.006*temp)) for temp in data[2:]]
#print(temp)

for i,val in enumerate(temp):
    if minval > val:
        minval = val
        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):
n=int(input())
t,a=[int(i) for i in input().split()]
h=[t-int(i)*0.006 for i in input().split()]
ans=0
for i in range(n):
  if abs(A-h[i])<abs(A-h[ans]):
    ans=i
print(ans+1)

n=int(input())
t,a=[int(i) for i in input().split()]
h=[t-int(i)*0.006 for i in input().split()]
ans=0
for i in range(n):
  if abs(a-h[i])<abs(a-h[ans]):
    ans=i
print(ans+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()))
ans = -1.0
d = 1e100
for i,j in enumerate(h):
  if abs(t - j*0.006) < d:
    ans = i+1
print(ans)


n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
ans = -1.0
d = 1e100
for i,j in enumerate(h):
  if abs(t - j*0.006) < d:
    ans = i+1
    d = abs(t - j*0.006)
print(ans)


n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
ans = -1.0
d = 1e100
for i,j in enumerate(h):
  if abs(t - j*0.006 - a) < d:
    ans = i+1
    d = abs(t - j*0.006 - a)
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())
x_li = list(map(int,input().split())) 

x_temp_li = []
x_a_li = []
for i in x_li:
    temp = t - i * 0.006
    x_temp_li.append(temp)

print(x_temp_li)

for i in x_temp_li:
    temp_a = i - a
    x_a_li.append(abs(temp_a))
    print(abs(temp_a))
print(x_a_li.index(min(x_a_li)) + 1)

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

x_temp_li = []
x_a_li = []
for i in x_li:
    temp = t - i * 0.006
    x_temp_li.append(temp)
for i in x_temp_li:
    temp_a = i - a
    x_a_li.append(abs(temp_a))
print(x_a_li.index(min(x_a_li)) + 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 = [int(i) for i in input().split()]
avg_tmp = []
for i in h_list:
    avg = int(t - i * 0.006)
    avg_tmp.append(avg)
min = abs(avg_tmp[0] - a)
print("min:", min)
l = 0
for i in range(1, n):
    min_diff = abs(t - avg_tmp[i] - a)
    print(min_diff)
    if(min > min_diff):
        min = min_diff
        l = i
print(l+1)

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

avg_tmp = abs(t - (lis[0] * 0.006) - a)
c = 0
for i in range(1, n):
    min_diff = abs(t - (lis[i] * 0.006) - a)
    if(avg_tmp > min_diff):
        l = i
print(l+1)

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

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

Verdicts: Wrong Answer

Runtime Error

Accepted