TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
import sys
lines = []
for line in sys.stdin:
  col = line.strip().split(' ')
  lines.append((int(col[0]), int(col[1])))
min = 1001
for cand in lines[1:]:
  if cand[1] < lines[0][1] and cand[0] < min:
    min = cand[1]
print(min if min < 1001 else 'TLE')

import sys
lines = []
for line in sys.stdin:
  col = line.strip().split(' ')
  lines.append((int(col[0]), int(col[1])))
min = 1001
for cand in lines[1:]:
  if cand[1] <= lines[0][1] and cand[0] < min:
    min = cand[0]
print(min if min < 1001 else 'TLE')

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
l1=[]
l2=[]
while n>0:
    a,b=(map(int,input().split()))
    l1.append(a)
    l2.append(b)
    n-=1
mn=[]
for i in range(n):
    if l2[i]>t:
        l1.remove(l1[i])
        l2.remove(l2[i])
print(min(l1))
print(l1)
print(l2)

n,T=[int(i) for i in input().split()]
mn=10000
print(n)
print(t)
for i in range(n):
    c,t=[int(i) for i in input().split()]
    if t<=T:
        mn=min(mn,c)
print("TLE" if mn==10000 else mn)

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

ans = float("inf")
for _ in range(n):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)

if ans == float("inf"):
    ans = "TLE"

print(ans)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
x,y = map(int,input().split())

cost = 1001

for i in range(x):
    a,b = map(int, input().split())
    if b <= y:
        cost = min(cost,x)

print("TLE" if cost==1001 else cost)

x,y = map(int,input().split())

cost = 1001

for i in range(x):
    a,b = map(int, input().split())
    if b <= y:
        cost = min(cost,x)

print(cost)

x,y = map(int,input().split())

cost = 1001

for i in range(x):
    a,b = map(int, input().split())
    if b <= y:
        cost = min(cost,a)

print("TLE" if cost==1001 else cost)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
a=[]
b=[]
for i in range(n):
  a.append(int(input()))
  b.append(int(input()))
c=[]
for j in range(n):
  if b[j]>t:
    c.append(1001)
  else:
    c.append(a[j])
if c==[1001]*n:
  print('TLE')
else:
  print(min(c))

    

n,t=map(int,input().split())
a=[]
b=[]
for i in range(n):
  s,u=map(int,input().split())
  a.append(s)
  b.append(u)
c=[]
for j in range(n):
  if b[j]>t:
    c.append(1001)
  else:
    c.append(a[j])
if c==[1001]*n:
  print('TLE')
else:
  print(min(c))

    


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
num,limit=input().strip().split(' ')


costs=[]
for i in range(int(num)):
    cost, time = input().strip().split(' ')
    if (int(time) > int(limit)):
        continue
    else:
        costs.append(int(cost))
if costs:
    print(costs)
    print(min(costs))
else:
    print('TLE')


num,limit=input().strip().split(' ')


costs=[]
for i in range(int(num)):
    cost, time = input().strip().split(' ')
    if (int(time) > int(limit)):
        continue
    else:
        costs.append(int(cost))
if costs:
    print(min(costs))
else:
    print('TLE')


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
[n,t]=list(map(int,input().split()))
ntlist=[list(map(int,input().split())) for _ in range(n)]

anslist=[nt[0] for nt in ntlist if nt[1]<=t]
if ans==[]:
  print("TLE")
else:
  print(min(ans))

[n,t]=list(map(int,input().split()))
ntlist=[list(map(int,input().split())) for _ in range(n)]
 
anslist=[nt[0] for nt in ntlist if nt[1]<=t]
if anslist==[]:
  print("TLE")
else:
  print(min(anslist))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int, input().split())
c = 999
for i in range(n):
    tmp = input().split()
    if t <= tmp[1]:
        if tmp[0] < c:
            c = tmp[0]
if c == 999:
    print('TLE')
    exit()
else:
    print(c)

n, t = map(int, input().split())
c = 10000
for i in range(n):
    tmp = input().split()
    if t >= int(tmp[1]):
        if int(tmp[0]) < c:
            c = int(tmp[0])
if c == 10000:
    print('TLE')
    exit()
else:
    print(c)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T=map(int,input().split())
c=list(map(int,input().split('\n')))
k=1000
l=1
for i in range(n):
    if c[i][1] <= T:
        l=0
        if c[i][0] < k:
            k = c[i][0]
if l==1:
    print('TLE')
else:
    print(k)

N,T=map(int,input().split())
k=1000
l=1
for i in range(N):
    c,t = int(input())
    if t[i] <= T:
        l=0
        if c[i] < k:
            k = c[i]
if l==1:
    print('TLE')
else:
    print(k)

N,T=map(int,input().split())
k=1000
l=1
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        l=0
        if c < k:
            k = c
if l==1:
    print('TLE')
else:
    print(k)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = list(map(int, input().split()))
paris = []
for i in range(N):
  c, t = list(map(int, input().split()))
  if t<=T:
    pairs.append((c, t))
if len(pairs)==0:
  print('TLE')
else:
  print(sorted(pairs, key=lambda p:p[0])[0][0])

N, T = list(map(int, input().split()))
pairs = []
for i in range(N):
  c, t = list(map(int, input().split()))
  if t<=T:
    pairs.append((c, t))
if len(pairs)==0:
  print('TLE')
else:
  print(sorted(pairs, key=lambda p:p[0])[0][0])

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
A=[]
while True:
    try:
        A.append(list(map(int,input().split())))
              

    except:
        break;

min = A[1][1] 

for i in range(1, len(A)):
  j = int(i)
  if A[j][1] =< A[0][1]:
    if A[j][0] < min:
      min = A[j][0]

if min < A[0][1]:
  print(min)
else:
  print("TLE")
    

A=[]
while True:
    try:
        A.append(list(map(int,input().split())))
              
 
    except:
        break;

T = A[0][1]
Tc = 0
min = A[1][0] 
 
for i in range(1, len(A)):
  j = int(i)
  if A[j][1] <= T:
    Tc = Tc+1
    if A[j][0] <= min:
      min = A[j][0]
     
      
if Tc == 0:
  print("TLE")
else:
  print(min)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
#cording: utf-8

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

ct = []
for i in range(N):
    ct.append(list(map(int, input().split())))

c_min = 1001
for i in range(N):
    if (ct[i][1] <= T) and (ct[i][0] <= c_min):
        c_min = ct[i][0]

print(minc if minc != 1001 else 'TLE')


#cording: utf-8

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

ct = [], []
for i in range(N):
    ct.append(map(int, input().split()))

if len(c) != 0:
    print(min(c))
else:
    print('TEL')


#cording: utf-8

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

ct = []
for i in range(N):
    ct.append(list(map(int, input().split())))

c_min = 1001
for i in range(N):
    if (ct[i][1] <= T) and (ct[i][0] <= c_min):
        c_min = ct[i][0]

print(c_min if c_min != 1001 else 'TLE')


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n = int(input())
t = int(input())
ans = 1234567
for i in range(n):
    c = int(input())
    if int(input) <= t:
        ans = max(ans,c)

if ans == 1234567:
    print("LTE")
else:
    print(ans)
        

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

ans = 12345

for i in range(n):
    c,t = map(int,input().split())
    if t <= T:
        ans = min(ans,c)

if ans == 12345:
    print("TLE")
else:
    print(ans)
        

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
#

array = list(map(int, input().strip().split(' ')))


N =  array[0]

T =  array[1]


print(N)
print(T)

if N < 1:
    quit()

if N > 100:
    quit()


if T < 1:
    quit()

if T > 1000:
    quit()


print(N)
print(T)

c_min = 9999


for i in range(N):
    array1 = list(map(int, input().strip().split(' ')))
    cN =  array1[0]

    tN =  array1[1]

    if cN < 1:
        quit()

    if cN > 1000:
        quit()

    if tN < 1:
        quit()

    if tN > 1000:
        quit()

    if tN <= T:
        if c_min > cN:

            c_min = cN

if c_min == 0:
    print("TLE")

else:
    print(c_min)


#

array = list(map(int, input().strip().split(' ')))


N =  array[0]

T =  array[1]


#print(N)
#print(T)

if N < 1:
    sys.exit()

if N > 100:
    sys.exit()


if T < 1:
    sys.exit()

if T > 1000:
    sys.exit()



c_min = 9999


for i in range(N):
    array1 = list(map(int, input().strip().split(' ')))
    cN =  array1[0]

    tN =  array1[1]

    if cN < 1:
        sys.exit()

    if cN > 1000:
        sys.exit()

    if tN < 1:
        sys.exit()

    if tN > 1000:
        sys.exit()
    
    if tN <= T:
        if c_min > cN:

            c_min = cN

if c_min == 9999:
    print("TLE")

else:
    print(c_min)

    


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
#6727236

ソースコード 

Copy
Copy
Tmp = []
Tmp = input().rstrip().split(' ')
 
nN = int(Tmp[0])
nT = int(Tmp[1])
 
nCost = 1001
nAns = 0
 
for i in range(nN):
  Tmp = input().rstrip().split(' ')
 
  nTmpCost = int(Tmp[0])
  nTmpT = int(Tmp[1])
  
  if nTmpT <= nT and nTmpCost < nCost:
    nCost = nTmpCost
    nAns = i+1

if nAns == 0:
  print('TLE')
else:
  print(nCost)
 

Tmp = []
Tmp = input().rstrip().split(' ')
 
nN = int(Tmp[0])
nT = int(Tmp[1])
 
nCost = 1001
nAns = 0
 
for i in range(nN):
  Tmp = input().rstrip().split(' ')
 
  nTmpCost = int(Tmp[0])
  nTmpT = int(Tmp[1])
  
  if nTmpT =< nT and nTmpCost < nCost:
    nCost = nTmpCost
    nAns = i+1

if nAns == 0:
  print('TLE')
else:
  print(nCost)
 

Tmp = []
Tmp = input().rstrip().split(' ')

nN = int(Tmp[0])
nT = int(Tmp[1])

nCost = 1001
nAns = 0

for i in range(nN):
  Tmp = input().rstrip().split(' ')

  nTmpCost = int(Tmp[0])
  nTmpT = int(Tmp[1])
  
  if nTmpT < nT and nTmpCost < nCost:
    nCost = nTmpCost
    nAns = i+1

if nAns == 0:
  print('TLE')
else:
  print(nAns)

    

  

Tmp = []
Tmp = input().rstrip().split(' ')
 
nN = int(Tmp[0])
nT = int(Tmp[1])
 
nCost = 1001
nAns = 0
 
for i in range(nN):
  Tmp = input().rstrip().split(' ')
 
  nTmpCost = int(Tmp[0])
  nTmpT = int(Tmp[1])
  
  if nTmpT <= nT and nTmpCost < nCost:
    nCost = nTmpCost
    nAns = i+1

if nAns == 0:
  print('TLE')
else:
  print(nCost)
 


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N , T  = map(int,input().split())
tmp_a = 1000
result = 0
count = 1
while count < N+1:
 a,b = map(int,input().split())
 if b <= T and a < tmp_a:
  result = count
  tmp_a = a
 count = count + 1
if result == 0:
 print('TLE')
else:
 print(result)

N , T  = map(int,input().split())
tmp_a = 1001
result = 1001
count = 1
while count < N+1:
 a,b = map(int,input().split())
 if b < T and a < tmp_a:
  result = count
  tmp_a = a
 count = count + 1
if result == 1001:
 print('TLE')
else:
 print(result)

N , T  = map(int,input().split())
tmp_a = 1000
result = 0
while N > 0:
 a,b = map(int,input().split())
 if b < T & a < tmp_a:
  result = N
  tmp_a = a
 N = N -1
if result == 0:
 print('TLE')
else:
 print(result)

N , T  = map(int,input().split())
tmp_a = 1000
result = 0
count = 0
while count < N:
 a,b = map(int,input().split())
 if b < T and a < tmp_a:
  result = N
  tmp_a = a
 count = count + 1
if result == 0:
 print('TLE')
else:
 print(result)

N , T  = map(int,input().split())
tmp_a = 1000
result = 0
count = 1
while count < N+1:
 a,b = map(int,input().split())
 if b < T and a < tmp_a:
  result = count
  tmp_a = a
 count = count + 1
if result == 0:
 print('TLE')
else:
 print(result)

N , T  = map(int,input().split())
result = 1001
while N > 0:
 a,b = map(int,input().split())
 if b <= T and a < result:
  result = a
 N = N - 1
if result == 1001:
 print('TLE')
else:
 print(result)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
#coding: utf-8
N, T = map(int, input().split())
ans = T
c = 0
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        c, ans = c, t
print(c if c == 0 else "TLE")

#coding: utf-8
N, T = map(int, input().split())
tans = T
cans = 10 ** 5
for i in range(N):
    c, t = map(int, input().split())
    if c <= cans and t <= T:
        cans, tans = c, t
print(cans if cans < 10**5 else "TLE")

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int, input().split())
w_dic = {}
for i in range(n):
  w, w_t = map(int, input().split())
  if w_t < t:
    w_dic[i+1] = w
print(min(w_dic, key=w_dic.get))    
    

n, t = map(int, input().split())
w_dic = {}
for i in range(n):
  w, w_t = map(int, input().split())
  if w_t < t:
    w_dic[i+1] = w
if w_dic:
  print(min(w_dic, key=w_dic.get))
else:
  print("TLE")
    

n, t = map(int, input().split())
w_dic = {}
for i in range(n):
  w, w_t = map(int, input().split())
  if w_t < t:
    w_dic[i+1] = w
  else:
    w_dic["TLE"] = 0
print(min(w_dic, key=w_dic.get))    
    

n, t = map(int, input().split())
w_dic = {}
for i in range(n):
  w, w_t = map(int, input().split())
  if w_t <= t:
    w_dic[i+1] = w
if w_dic:
  print(min(w_dic, key=w_dic.get))
else:
  print("TLE")
    

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

ans = 1<<60
for _ in range(N):
  cost, time = map(int, input().split())
  if time <= T:
    ans = min(cost, ans)
print(ans if ans < 1<<60 else "TLE")    

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
l = []
flag = False
for i in range(n):
    if a[i][2] <= t:
        l.append(a[i][0])
        flag = True
if flag:
    print(min(l))
else:
    print('TLE')

n, t = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
l = []
flag = False
for i in range(n):
    if a[i][1] <= t:
        l.append(a[i][0])
        flag = True
if flag:
    print(min(l))
else:
    print('TLE')

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
num, time_lim = list(map(int, input().spli()))
ans = 'TLE'
for i in range(num):
  cost, time_data = list(map(int, input().spli()))
  if time_data > time_lim:
    continue
  if ans == 'TLE':
    ans = cost
  if ans > cost:
    ans = cost
print(ans)

num, time_lim = list(map(int, input().split()))
ans = 'TLE'
for i in range(num):
  cost, time_data = list(map(int, input().split()))
  if time_data > time_lim:
    continue
  if ans == 'TLE':
    ans = cost
  if ans > cost:
    ans = cost
print(ans)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
a = 9999
for _ in N:
    c, t = map(int, input().split())
    if t <= T:
        a = min(a, c)
if a == 9999:
    print('TLE')
else:
    print(a)


N, T = map(int, input().split())
a = 9999
for _ in range(N):
    c, t = map(int, input().split())
    if t <= T:
        a = min(a, c)
if a == 9999:
    print('TLE')
else:
    print(a)


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
# -*- coding: utf-8 -*-

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

cNtN = [[0] * 2 for i in range(N)]
for i in range(N):
    cNtN[i][0], cNtN[i][1] = map(int, input().split())

min_c = float('inf')
for i in range(N):
    if cNtN[i][1] <= T and cNtN[i][0] < min_C:
        min_c = cNtN[i][0]

if min_c == float('inf'):
    print('TLE')
else:
    print(min_c)

# -*- coding: utf-8 -*-

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

cNtN = [[0] * 2 for i in range(N)]
for i in range(N):
    cNtN[i][0], cNtN[i][1] = map(int, input().split())

min_c = float('inf')
for i in range(N):
    if cNtN[i][1] <= T and cNtN[i][0] < min_c:
        min_c = cNtN[i][0]

if min_c == float('inf'):
    print('TLE')
else:
    print(min_c)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
m=1001
for i in range(n):
    c,t=map(int,input().split())
    if i<=t:m=min(m,c)
print("TLE" if m==1001 else m)

n,t=map(int,input().split())
m=1001
for i in range(n):c,t=map(int,input().split())
  if i<=t:m=min(m,c)
print("TLE" if m==1001 else m)

N,T=map(int,input().split())
min_cost=1001
for i in range(N):
    c,t=map(int,input().split())
    if t<=T:
        min_cost=min(min_cost,c)
print("TLE" if min_cost==1001 else min_cost)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t= map(int, input().split())
m = 1001
for i in range(n):
  c, t = map(int, input().split())
  if t < T:
    m = min(c, m)
print(c)

n, T= map(int, input().split())
m = 1001
for i in range(n):
  c, t = map(int, input().split())
  if t <= T:
    m = min(c, m)
if m == 1001:
  print("TLE")
else:
  print(m)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int, input().split())
ans = float('inf')
for i in range(n):
    c, t2 = map(int, input().split())
    if t2 <= t:
        ans = min(ans, c)
print('TLE' if ans = float('inf') else c)

n, T = map(int,input().split())
cost = 10000
for i in range(n):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c)
if cost == 10000:
    print('TLE')
else:
    print(cost)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

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

array = [list(map(int, input().split())) for i in range(N)]

cost = 0

for i in range(N):
    if array[i][1] <= T and (cost == 0 or cost < array[i][0]:
    　   cost = arrayp[i][0]
if cost == 0:
    print('TLE')
print(cost)


N, T = map(int, input().split())
cost = 1001
for i in range(N):
    ci, ti = map(int, input().split())
    if ti <= T and  cost > ti:
        cost = ti
if cost > 1000:
    print('TLE')
    exit()
print(cost)


N, T = map(int, input().split())
cost = 1001
for i in range(N):
    ci, ti = map(int, input().split())
    if ti <= T and cost > ci:
        cost = ti
if cost > 1000:
    print('TLE')
    exit()
print(cost)


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

array = [list(map(int, input().split())) for i in range(N)]

cost = 0

for i in range(N):
    if array[i][1] <= T and (cost == 0 or cost < array[i][0]):
        cost = array[i][0]
if cost == 0:
    print('TLE')
print(cost)


N, T = map(int, input().split())
cost = 1001
for i in range(N):
    ci, ti = map(int, input().split())
    if ti <= T and cost > ci:
        cost = ci
if cost > 1000:
    print('TLE')
    exit()
print(cost)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
# cording:utf-8
n,t = (int(x) for x in input().split())
cost_list = list()
time_list = list()
while n >= 1:
    c,tn = (int(x) for x in input().split())
    if tn >= t:
        cost_list.append(c)
        time_list.append(tn)
        n = n - 1
    else:
        n = n - 1
best_time = min(time_list)
if best_time <= t:
    best_time_number = time_list.index(best_time)
    print(cost_list[best_time_number])
else:
    print('TLE')

# cording:utf-8

n,t_limit = (int(x) for x in input().split())

cost_list = list()
time_list = list()

while n >= 1:
    ci,ti = (int(x) for x in input().split())
    if ti <= t_limit:   
        cost_list.append(ci)    
        time_list.append(ti)    
        n = n - 1
    else:
        n = n - 1
if not time_list:   
    print('TLE')
else:
    print(min(cost_list))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, T = lr()
CT = np.array([lr() for _ in range(N)])
CT = CT[CT[:, 1] <= T]
time = CT[:, 0]
if not time:
    print('TLE')
else:
    answer = time.min()
    print(answer)


# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, T = lr()
CT = np.array([lr() for _ in range(N)])
CT = CT[CT[:, 1] <= T]
time = CT[:, 0]
if len(time) == 0:
    print('TLE')
else:
    answer = time.min()
    print(answer)


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
A = []
for i in range(N):
    temp , B = map(int, input().split())
    if B <= T:
        A.append(temp)
if not A:
    print("TLE")
else:
    print(A.min())

N, T = map(int, input().split())
A = []
for i in range(N):
    temp , B = map(int, input().split())
    if B <= T:
        A.append(temp)
if not A:
    print("TLE")
else:
    print(min(A))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t = map(int,input().split())

m = 1001

for i in range(N):
    
    c,t = map(int,input().split())
    
    if t <= T:
        m=min(m,c)
        
print("TLE" if m==1001 else m)



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

m = 1001

for i in range(N):
    
    c,t = map(int,input().split())
    
    if t <= T:
        m=min(m,c)
        
print("TLE" if m==1001 else m)



Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

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

ans = []

for i in range(N):
    c,t = list(map(int, input().split()))
    if T > t[i]:
        number = c[i]
        ans.appned(number)
    

if len(ans) == 0:
    print("TLE")
else:
    print(min(ans))        

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

ans = []

for i in range(N):
    c,t = map(int, input().split())
    if T > t[i]:
        ans.appned(c[i])
    

if len(ans) == 0:
    print("TLE")
else:
    print(min(ans))    

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

ans = []

for i in range(N):
    c,t = map(int, input().split())
    if T > t:
        ans.appned(c)
    

if len(ans) == 0:
    print("TLE")
else:
    print(min(ans))        
    


N, T = map(int,input().split())
c = []
t = []

for i in range(N):
  c1, t1 = map(int,input().split())
  c.append(c1)
  t.append(t1)
  
ans = []

for i in range(N):
  if t[i] <= T:
    ans.append(c[i])

if len(ans) == 0:
  print("TLE")
else:
  print(min(ans))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):

c=[]
t=[]
N,T= map(int, input().split())

for i in range (0,N):
    c_,t_= map(int, input().split())
    if(t_<=T):
        c.append(c_)
        t.append(t_)
print(N,T)
print(c,t)

if( len(t)==0 ):
    print("TLE")
else:
    print(min(c))


c=[]
t=[]
N,T= map(int, input().split())

for i in range (0,N):
    c_,t_= map(int, input().split())
    if(t_<=T):
        c.append(c_)
        t.append(t_)

if( len(t)==0 ):
    print("TLE")
else:
    print(min(c))

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t = map(int,input().split())
out = 1001
o = t+1
outnum = 1001
for i in range(n):
  c, tim = map(int,input().split())
  if tim < t and c < out:
    out = c
    outnum = i
if outnum == 1001:
  print('TLE')
else:
  print(outnum)

n,t = map(int,input().split())
out = 1001
o = t+1
outnum = 1001
for i in range(n):
  c, tim = map(int,input().split())
  if tim <= t and c < out:
    out = c
    outnum = i
if outnum == 1001:
  print('TLE')
else:
  print(out)


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = list(map(int, input().split()))
ans = 1001
for i in range(N):
    c, t = list(map(int, input().split()))
    if T < t:
        break
    elif ans < c:
        break
    else:
        ans = c
print(ans if ans < 1001 else 'TLE')

N, T = list(map(int, input().split()))
ans = 1001
for i in range(N):
    c, t = list(map(int, input().split()))
    if T < t:
        continue
    elif ans < c:
        continue
    else:
        ans = c
print(ans if ans < 1001 else 'TLE')

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
a,b=map(int,inpu().split())
meta = int(a)
for i in range(a):
  x,y = map(int,input().split())
  if b > y and a > x:
    a = x
if meta > a:
  print(a)
else:
  print("TLE")
  

a,b=map(int,inpu().split())
x,y = [list(map(int,input().split())) for i in range(a)]
for i in range(a):
  if b > y[i] and a > x[i]:
    a = x[i]
print(a)

a,b=map(int,inpu().split())
x,y = [list(map(int,input().split())) for i in range(a)]
if b < max(y):
  print("TLE")
else:
  for i in range(a):
    if b > y[i] and a > x[i]:
      a = x[i]
  print(a)
    

N,T = map(int,input().split())
m = 1001
for i in range(N):
  c,t=map(int,input().split())
  if t<=T:
    m = min(m,c)
print("TLE" if m == 1001 else m)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
cage,cage2=[],[]
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
	cage.append(c)
if cage==None:
  print("TLE")
else:
  print(soted(cage)[0])

N, T = map(int, input().split())
cage,cage2=[],[]
for n,i in enumerate(N):
  c, t = map(int, input().split())
  if t<=T:
	cage.append(c)
    cage2.append(n)
if cage==None:
  print("TLE")
else:
  print(soted(cage)[0]

N, T = map(int, input().split())
cage,cage2=[],[]
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
	cage.append(c)
if cage==None:
  print("TLE")
else:
  print(min(cage))

N, T = map(int, input().split())
cage,cage2=[],[]
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
	cage.append(c)
    cage2.append(n)
if cage==None:
  print("TLE")
else:
  print(soted(cage)[0])

N, T = map(int, input().split())
cage,cage2=[],[]
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
      cage.append(c)
if len(cage)==0:
  print("TLE")
else:
  print(min(cage))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t = map(int,input().split())
ansseq=[]
for i in range(n):
  a,b = map(int,input().split())
  if b <= t:
    ansseq.append(b)
if len(ansseq) == 0:
  print("TLE")
else:
  print(min(ansseq))

n,t = map(int,input().split())
ansseq=[]
for i in range(n):
  a,b = map(int,input().split())
  if b <= t:
    ansseq.append(a)
if len(ansseq) == 0:
  print("TLE")
else:
  print(min(ansseq))


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int,input())
ans=10000

for i in range(N):
  c, tt==map(int,input())
  if tt <= T:
    ans=min(c,ans)

if ans==10000:
  print('TLE')
else:
  print(ans)

N, T = list(map(int, input().split()))
ans=10000

for i in range(N):
  c, tt==list(map(int, input().split()))
  if tt <= T:
    ans=min(c,ans)

if ans==10000:
  print('TLE')
else:
  print(ans)

N, T = map(int,input())
tmp=10000
ans=0

for i in range(N):
  c, tt==map(int,input())
  if tt <= T:
    tmp=min(c,tmp)
    if c==ans:
      ans=i

if ans==0:
  print('TLE')
else:
  print(ans)

N, T = list(map(int, input().split()))
ans=10000

for i in range(N):
  c, tt=list(map(int, input().split()))
  if tt <= T:
    ans=min(c,ans)

if ans==10000:
  print('TLE')
else:
  print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

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

c_list = []
t_list=[]
for i in range(N):
	c,t=map(int, input().split())
	c_list.append(c)
	t_list.append(t)

c_list = np.array(c_list)
t_list = np.array(t_list)	

if t_list[t_list<=T]:
	print('TLE')
else:
	print(min(c_list[t_list<=T]))

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

c_list = []
t_list=[]
for i in range(N):
	c,t=map(int, input().split())
	c_list.append(c)
	t_list.append(t)

c_list = np.array(c_list)
t_list = np.array(t_list)	

if not np.any(t_list[t_list<=T]):
	print('TLE')
else:
	print(min(c_list[t_list<=T]))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
ct = [list(map(int, input().split()), idx+1) for idx in range(N)]

costs = list(filter(lambda x: x[1] <= T, ct))
if len(costs) == 0:
  print('TLE')
else:
  costs.sort(key=lambda x: x[0])
  print(costs[0][2])

N, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(N)]
costs = list(filter(lambda x: x[1] <= T, ct))
if len(costs) == 0:
  print('TLE')
else:
  costs.sort(key=lambda x: x[0])
  print(costs[0][0])

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split())
CT = [list(map(int,input().split())) for i in range(N)]
CT = list(filter(lambda x:x[1]<=N,CT))
print(min(CT[0]))

N,T = map(int,input().split())
CT = [list(map(int,input().split())) for i in range(N)]
CT = list(filter(lambda x:x[1]<=T,CT))
if len(CT)==0:
    print('TLE')
else:
    print(min(CT)[0])

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T=map(int,input().split())
c_l=[]
t_l=[]
for i in range(n):
	c,t=map(int,input().split())
	if t>T:
		c=1001
	c_l.append(c)
	t_l.append(t)
print("TLE") if min(c_l) == 1001 else min(c_l)

n,T=map(int,input().split())
c_l=[]
t_l=[]
for i in range(n):
	c,t=map(int,input().split())
	if t>T:
		c=1001
	c_l.append(c)
	t_l.append(t)
print("TLE" if min(c_l) == 1001 else min(c_l))

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T=map(int,input().split())
c,t=[map(int,input().split() for i in range(n))]
k=[]
if all(t)>T:
    print('TLE')
else:
    for i in range(n):
        if t[i]<=T:
            k.append(c[j])
    print(min(k))


n,T=map(int,input().split())
c,t=[int(input().split()) for i in range(n)]
k=[]
if all(t)>T:
    print('TLE')
else:
    for i in range(n):
        if t[i]<=T:
            k.append(c[j])
    print(min(k))

n,T=map(int,input().split())
m=1001
for i in range(n):
    c,t=map(int,input().split())
    if t<=T:
        m=min(m,c)
        print(m)
    else:
        print('TLE')


n,T=map(int,input().split())
m=1001
for i in range(n):
    c,t=map(int,input().split())
    if t<=T:
        m=min(m,c)
if m==1001:
    print('TLE')
else:
    print(m)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n_list = list(map(int, input().split()))


n = n_list[0]
time = n_list[1]

x = 0
output = 'TLE'
num = 1

while num <= n:
    n_list2 = list(map(int, input().split()))
    if time - n_list2[1] > 0:
        if x - (time - n_list2[1]) < 0:
            output = n_list2[1]
            num += 1
        else:
          num += 1
    else:
      num += 1

print(output)


n,TIME = list(map(int, input().split()))

x = 0
num = 1
costs = []

while num <= n:
    cost, time = list(map(int, input().split()))
    num += 1
    if TIME - time >= 0:
        costs.append(cost)

if len(costs) != 0:
    output = min(costs)
else:
    output = "TLE"
print(output)


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int,input().split())
ans = float("inf")

for i in range(N):
    c,t = map(int,input(),split())
    if t <= T:
        ans = min(num,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


N, T = map(int,raw_input().split())
ans = float("inf")

for i in range(N):
    c,t = map(int,input().split())
    if t <= T:
        ans = min(ans,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


N, T = map(int,input().split())
ans = float("inf")

for i in range(N):
    c,t = map(int,input(),split())
    if t <= T:
        ans = min(ans,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


N, T = map(int,raw_input().split())
ans = float("inf")

for i in range(N):
    c,t = map(int,input(),split())
    if t <= T:
        ans = min(ans,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


N, T = map(int,raw_input().split())
ans = float("inf")

for i in range(N):
    c,t = map(int,input(),split())
    if t <= T:
        ans = min(num,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


N, T = map(int, raw_input().split())
ans = float("inf")

for i in range(0,N):
    c,t = map(int,input(),split())
    if t <= T:
        ans = min(num,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


N, T = map(int,input().split())
ans = float("inf")

for i in range(N):
    c,t = map(int,input().split())
    if t <= T:
        ans = min(ans,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
ct=[list(map(int,input().split()))for i in range(n)]
ct.sort()
for i in ct:
    if i[1]<=t:
        print(i[0])
        break
ct.sort(key=lambda x:x[1])
if ct[-1][1]>t:
    print("TLE")


n,t=map(int,input().split())
ct=[list(map(int,input().split()))for i in range(n)]
ct.sort()
a=False
for i in ct:
    if i[1]<=t:
        b=i[0]
        a=True
        break
if a:
    print(b)
else:
    print("TLE")

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=map(int,input().split())
ans=0
for _ in range(N):
  c,t=map(int,input().split())
  if t<=T:
    ans=max(ans,c)
print(ans)

N,T=map(int,input().split())
ans=0
for _ in range(N):
  c,t=map(int,input().split())
  if t<=T:
    ans=max(ans,c)
if ans==0:
  print("TLE")
else:
  print(ans)

N,T=map(int,input().split())
ans=1001
for _ in range(N):
  c,t=map(int,input().split())
  if t<=T:
    ans=min(ans,c)
if ans==1001:
  print("TLE")
else:
  print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted