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):
num, time = map(int, input().split(' '))
# print(num, time)

columns = []
able_columns = []
my_dict = {}


for i in range(num):
    columns = (list(map(int,input().rstrip().split(' '))))
    columns.append(i+1)
    if columns[1] < time:
        able_columns.append(columns)

if able_columns == []:
    print('TLE')

# print(able_columns)
# print(min(able_columns[0]))

else:
    for i in able_columns:
        my_dict[i[0]] = i[2]
    
    min_cost = min(my_dict)
    min_cost_num = my_dict[min_cost]
    print(min_cost_num)


num, time = map(int, input().split(' '))
# print(num, time)

columns = []
able_columns = []
my_dict = {}


for i in range(num):
    columns = (list(map(int,input().rstrip().split(' '))))
    if columns[1] <= time:
        able_columns.append(columns)

if able_columns == []:
    print('TLE')


else:
    for i in able_columns:
        my_dict[i[0]] = i[1]
    print(min(my_dict))


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

path = []
for _ in range(N):
  c, t = list(map(int, input().split()))
  if t <= T:
    path.append(c)
sort(path)
reverse(path)
if len(path) > 0:
  print(path[0])
else:
  print(path[0])

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

path = []
for _ in range(N):
  c, t = list(map(int, input().split()))
  if t <= T:
    path.append(c)
path.sort()
if len(path) > 0:
  print(path[0])
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):
N,T=map(int,input().split())
res=2000
for i in N:
  c,t=map(int,input().split())
  if t>T:
    continue
  else:
    res=min(res,c)
if res==2000:
  print("TLE")
else:
  print(res)

N,T=map(int,input().split())
res=2000
for i in N:
  c,t=map(int,input())
  if t>T:
    continue
  else:
    res=min(res,c)
if res=2000:
  print("TLE")
else:
  print(res)

N,T=map(int,input())
res=2000
for i in N:
  c,t=map(int,input())
  if t>T:
    continue
  else:
    res=min(res,c)
if res=2000:
  print("TLE")
else:
  print(res)

N,T=map(int,input().split())
res=2000
for i in N:
  c,t=map(int,input().split())
  if t>T:
    continue
  else:
    res=min(res,c)
if res=2000:
  print("TLE")
else:
  print(res)

N,T=map(int,input().split())
res=2000
for i in range(N):
  c,t=map(int,input().split())
  if t>T:
    continue
  else:
    res=min(res,c)
if res==2000:
  print("TLE")
else:
  print(res)

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())
A = []
for i in range(n):
  a = list(map(int, input().split()))
  if a[1] =< t:
    A.append(a[0])
if len(A) == 0:
  print('TLE')
else:
  print(min(A))

n, t = map(int, input().split())
A = []
for i in range(n):
  a = list(map(int, input().split()))
  if a[1] <= t:
    A.append(a[0])
if len(A) == 0:
  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):
import sys
input = sys.stdin.readline

N, T = map(int,input().split())
ct=[list(map(int, input().split())) for _ in range(N)]
ans = 10000
for i in range(N):
    if cn[i][1] > T: continue
    ans = min(ans,cn[i][0])
print(ans)

import sys
input = sys.stdin.readline

N, T = map(int,input().split())
ct=[list(map(int, input().split())) for _ in range(N)]
INF = 100000
ans = INF
for i in range(N):
    if ct[i][1] > T: continue
    ans = min(ans,ct[i][0])
if ans == INF:
    ans="TLE"
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())
ans = 1005
for i in range(N):
    c,t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)
print("TLE" if m == 1005 else ans)


N,T = map(int, input().split())
ans = 1005
for i in range(N):
    c,t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)
print("TLE" if ans == 1005 else 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())
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())
ct = [[map(int,input().split())] for _ in range(n)]
cost = 9999
for i in range(n):
  c,t = ct[i][0],ct[i][1]
  if t<=T:
    cost = min(cost,c)
print(cost if cost != 9999 else 'TLE')

n,T = map(int,input().split())
ct = [[map(int,input().split())] for _ in range(n)]
cost = 9999
for i in range(n):
    c,t = ct[i][0],ct[i][1]
    if t<=T:
        cost = min(cost,c)
print(cost if cost != 9999 else 'TLE')

n,T = map(int,input().split())
ct = [list(map(int,input().split())) for _ in range(n)]
cost = 9999
for i in range(n):
    c,t = ct[i][0],ct[i][1]
    if t<=T:
        cost = min(cost,c)
print(cost if cost != 9999 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,T=map(int,input().split())
ans=100000
for _ in range(N):
  c,t=map(int,input().split())
  if t<=T:
    ans=min(ans,c)
print('TLE' if ans=100000 else ans)

N,T=map(int,input().split())
ans=100000
for _ in range(N):
  c,t=map(int,input().split())
  if t<=T:
    ans=min(ans,c)
print('TLE' if ans==100000 else 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())
ans=100000000
for i in range(n):
  c,t=map(int,input().split())
  if t>T: continue
  ans=min(c,ans)
print(ans if ans<100000000 else 'TLE')

N,T=map(int,input().split())
ans=100000000
for i in range(N):
  c,t=map(int,input().split())
  if t>T: continue
  ans=min(c,ans)
print(ans if ans<100000000 else '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):
N, T = map(int, input().split())
dic = {}
for i in range(N):
    c, t = [int(i) for i in input().split()]
    dic[t].append(c)
if max(dic) <= T:
    print(dic[max(dic)])
else:
    print('TLE')

N, T = map(int, input().split())
dic = {}
for i in range(N):
    c, t = map(int, input().split())
    dic[t].append(c)
if max(dic) <= T:
    print(dic[max(dic)])
else:
    print('TLE')

N, T = input().split()
dic = {}
for i in range(int(input()):
    c, t = [int(i) in input().split()]
    dic[t].append(c)
if max(dic) <= T:
    print(dic[max(dic)])
else:
    print('TLE')

N, T = input().split()
dic = {}
for i in range(int(input()):
	c, t = [int(i) in input().split()]
    dic[t].append(c)
if max(dic) <= T:
	print(dic[max(dic)])
else:
	print('TLE')

            


N, T = input().split()
dic = {}
for i in range(N):
    c, t = [int(i) for i in input().split()]
    dic[t].append(c)
if max(dic) <= T:
    print(dic[max(dic)])
else:
    print('TLE')

N, T = input().split()
dic = {}
for i in range(int(input()):
	c, t = [int(i) in input().split()]
    dic[t].append(c)
if max(dic) <= T:
	print(dic[max(dic)])
else:
	print('TLE')

N, T = map(int, input().split())
dic = {}
for i in range(N):
    c, t = map(int, input().split())
    dic[t] = c
if max(dic) <= T:
    print(dic[max(dic)])
else:
    print('TLE')

N, T = input().split()
dic = {}
for i in range(int(input()):
    c, t = [int(i) for i in input().split()]
    dic[t].append(c)
if max(dic) <= T:
    print(dic[max(dic)])
else:
    print('TLE')

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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):
ct=[]
for i in range(N):
    ct.append(list(map(int, input().strip().split(' '))))
    
tle=True
c=100000000

for i in range(N):
    if ct[i][1]<=T:
        tle=False
        c=min(c,ct[i][0])
        
if tle:
    print('TLE')
else:
    print(c)

ct=[]
for i in range(N):
    ct.append(list(map(int, input().strip().split(' '))))
    
tle=True
c=10000

for i in range(N):
    if ct[i][1]<=T:
        tle=False
        c=min(c,ct[i][0])
        
if tle:
    print('TLE')
else:
    print(c)

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

ct=[]
for i in range(N):
    ct.append(list(map(int, input().strip().split(' '))))
    
tle=True
c=100000000

for i in range(N):
    if ct[i][1]<=T:
        tle=False
        c=min(c,ct[i][0])
        
if tle:
    print('TLE')
else:
    print(c)

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 = map(int,input().split())
min_cost = 10**3 + 1
for i in range(n):
    c, t = map(int,input().split())
    if t <= T and c < min_cost:
        min_cost = c
if c != 10**3 + 1:
    print(min_cost)
else:
    print("TLE")

N,T = map(int,input().split())
min_cost = 10**3 + 1
for i in range(N):
    c, t = map(int,input().split())
    if t <= T and c < min_cost:
        min_cost = c
if min_cost != 10**3 + 1:
    print(min_cost)
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):
N,T=list(map(int,input().split()))
minCos = 10000
ans = 0
for i in range(N):
  c,t=list(map(int,input().split()))
  if t < T:
    if min(minCos,c) == c:
      ans = i+1
      minCos = c
if ans == 0:
  print("TLE")
else:
  print(ans)

N,T=list(map(int,input().split()))
minCos = 10000
ans = 0
for i in range(N):
  c,t=list(map(int,input().split()))
  if t <= T:
    if min(minCos,c) == c:
      ans = i+1
      minCos = c
if ans == 0:
  print("TLE")
else:
  print(ans)

N,T=list(map(int,input().split()))
minCos = 10000
ans = 0
for i in range(N):
  c,t=list(map(int,input().split()))
  if t <= T:
    if min(minCos,c) == c:
      ans = c
      minCos = c
if ans == 0:
  print("TLE")
else:
  print(ans)

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())
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())
minCost = 1001
for i range in n:
    cc, tt = map(int, input().split())
    if tt <= t and cc < minCost:
        minCost = cc
if minCost == 1001:
    print('TLE')
else:
    print(minCost)

n, t = map(int, input().split())
minCost = 1001
for i in range(n):
    cc, tt = map(int, input().split())
    if tt <= t and cc < minCost:
        minCost = cc
if minCost == 1001:
    print('TLE')
else:
    print(minCost)

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 = [None] * N
t = [None] * N

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

a = [x for x, y in zip(c, t) if y <= T]
if len(a) > 0:
  print(min(a))
else:
  print('TLE')

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

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

a = [x for x, y in zip(c, t) if y <= T]
if len(a) > 0:
  print(min(a))
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):
N, T = list(map(int, input().split(" ")))
c = []
t = []

for i in range(N):
    ci, ti = input().split(" ")
    c.append(int(ci))
    t.append(int(ti))
if min(t) > T:
    print("TLE\n")

else:
    cost = 10000
    for i in range(N):
        if cost > c[i] and T >= t[i]:
            cost = c[i]
    print(

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

for i in range(N):
    ci, ti = input().split(" ")
    c.append(int(ci))
    t.append(int(ti))
if min(t) > T:
    print("TLE\n")

else:
    cost = 10000
    for i in range(N):
        if cost > c[i] and T >= t[i]:
            cost = c[i]
    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())
A = []
B = []
for i in range(N):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
    i += 1
print(A,B)
if T >= min(B):
    for j in range(len(A)-1):
        if B[j] > T:
            A.pop(j)
            B.pop(j)
        else:
            pass
    print(min(A))
else:
    print("TLE")

N, T = map(int, input().split())
ans = "TLE"
x = 1001
for i in range(N):
    c, t = map(int, input().split())
    if c <= x and t <= T:
        x = c
        ans = c
    else:
        pass
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(" "))

way = []

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

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

way = []

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

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())
ct=[list(map(int,input().split())) for a in range(N)]

ct=sorted(ct, key=lambda x:(x[0],x[1]))

for i in range(N):
    if ct[i][1]<=t:
        print(ct[i][0])
        break
else:
    print('TLE')

N,T=map(int,input().split())
ct=[list(map(int,input().split())) for a in range(N)]

ct=sorted(ct, key=lambda x:(x[0],x[1]))

for i in range(N):
    if ct[i][1]<=T:
        print(ct[i][0])
        break
    else:
        print('TLE')
        break

N,T=map(int,input().split())
ct=[list(map(int,input().split())) for a in range(N)]

ct=sorted(ct, key=lambda x:(x[0],x[1]))

for i in range(N):
    if ct[i][1]<=T:
        print(ct[i][0])
        break
else:
    print('TLE')

Verdicts: 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,time=(map(int,input().split()))
c=[]
t=[]
for i in range(n):
    C,T=map(int,input().split())
    c.append(C)
    t.append(T)
#print(c)
#print(t)
if min(t)>time:
    print("TLE")
else:
    p=[]
    for i in range(len(t)):
        if t[i]>time:
            p.append(i)
    if len(p)==1:
        print(c[p[0]])
    #print(p)
    for i in p:
        del t[i]
        del c[i]
    print(min(c))

n,time=(map(int,input().split()))
c=[]
t=[]
for i in range(n):
    C,T=map(int,input().split())
    c.append(C)
    t.append(T)
#print(c)
#print(t)
if min(t)>time:
    print("TLE")
else:
    for i in range(len(t)):
        if t[i]>time:
            c[i]=max(c)


    #print(c)
    if len(c)==1:
        print(c[0])
    elif len(c)==2:
        if c[0]>=c[1]:
            print(c[1])
        else:
            print(c[0])
    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):
4 3
1 1000
2 4
3 1000
4 500

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

clist = []
for i in range(N):
    c, t = map(int,input().split())
    if t <= T:
        clist.append(c)
if len(clist) > 0:
    print(min(clist))
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):
N, T = map(int, input().split())
cost = 1001
for i in range(N):
	c, t = map(int, input().split())
	if t < T:
		if c < cost:
			cost = c

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

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

if cost == 1001:
	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())
ans = 'TLE'
for i in range(n):
  c, t = map(int, input().split())
  if t <= T:
    ans = min(ans, c)
print(ans)

n, T = map(int, input().split())
ans = 1001
for i in range(n):
  c, t = map(int, input().split())
  if t <= T:
    ans = min(ans, c)
print(ans if ans != 1001 else '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):
a,b=input().split()
a=int(a)
b=int(b)
c=[input().split() for i in range(a)]
d=1001
for i in range(a-1):
  if int(c[i][1])<=b:
    if d>int(c[i][0]):
      d=int(c[i][0])
print(d)
      

a,b=input().split()
a=int(a)
b=int(b)
c=[input().split() for i in range(a)]
d=1001
for i in range(a-1):
  if int(c[i][1])<=b:
    if d>int(c[i][0]):
      d=int(c[i][0])
if d==1001:
  print("TLE")
else:
  print(d)
      

a,b=input().split()
a=int(a)
b=int(b)
c=[input().split() for i in range(a)]
d=1001
for i in range(a):
  if int(c[i][i])<=b:
    if d>int(c[i][i]):
      d=int(c[i][i])
print(d)
      

a,b=input().split()
a=int(a)
b=int(b)
c=[input().split() for i in range(a)]
d=1001
for i in range(a):
  if int(c[i][1])<=b:
    if d>int(c[i][0]):
      d=int(c[i][0])
if d==1001:
  print("TLE")
else:
  print(d)
      

Verdicts: Wrong Answer

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())
l=[]
for i in range(N):
    c,t=map(int,input().split())
    if t < T:
        l.append(c)
if l =[]:
    print("TLE")
elif:
    print(min(l))

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

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 = []
for n in range(N):
  c,t = map(int,input().split())
  CT.append([c,t])
sorted(CT,key=lambda x: x[0])
for ct in CT:
  if ct[1] <= T:
    print(ct[0])
    break

N,T = map(int,input().split())
CT = []
for n in range(N):
  c,t = map(int,input().split())
  CT.append([c,t])
CT = sorted(CT,key=lambda x: x[0])
ans = False
for ct in CT:
  if ct[1] <= T:
    print(ct[0])
    ans = True
    break
if ans:
  print("TLE") 


N,T = map(int,input().split())
CT = []
for n in range(N):
  c,t = map(int,input().split())
  CT.append([c,t])
CT = sorted(CT,key=lambda x: x[0])
ans = True
for ct in CT:
  if ct[1] <= T:
    print(ct[0])
    ans = False
    break
if ans:
  print("TLE") 


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())
cost = 1001
for i in range(N):
  c,t = map(int,input().split())
  if t<=T:cost=min(m,c)
print("TLE" if cost==1001 else m)


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

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

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 = map(int,input().split())
comp = []
for i in range(N):
    nt = [int(i) for i in input().split()]
    comp.append(nt)
print(comp)


cost = []
for i in range(N):
    if comp[i][1] <= T:
        temp = [comp[i][0],comp[i][1]]
        cost.append(temp)
cost = sorted(cost, key = lambda x:x[1])
print(cost[0][0])

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



cost = []
for i in range(N):
    if comp[i][1] <= T:
        temp = [comp[i][0],comp[i][1]]
        cost.append(temp)
cost.sort()
print(cost[0][1])

N,Y = map(int,input().split())
ct = {}
for i in range(N):
    temp = [int(i) for i in input().split()]
    if temp[1] > Y:
        pass
    else:
        ct[temp[0]] = temp[1]

if len(ct) > 0:
    ct = sorted(ct.items(),key=lambda x: x[0])
    print(ct[0][0])
else:
    print("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):
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N,T = map(int,input().split())
CT = [tuple(map(int,input().split())) for _ in range(N)]

ans = -1
nc = 9999
for i in range(N):
    c,t = CT[i]
    if t <= T and c < nc:
        ans = i

print(i+1)

# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N,T = map(int,input().split())
CT = [tuple(map(int,input().split())) for _ in range(N)]

INF = float("inf")
ans = INF
for c,t in CT:
    if t <= T and c < ans:
        ans = c

print(ans if ans != INF 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):
# input
N, T = map(int, input().split())
rhr = []
r_append = rhr.append
for i in range(1, N + 1):
    c, t = map(int, input().split())
    r_append(
        {
            "index": i,
            "cost": c,
            "time": t
        }
    )

target_routes = [
    r
    for r in rhr
    if r["time"] < T
]

if not target_routes:
    print("TLE")
else:
    rhr.sort(key=lambda x: x["cost"] / x["time"])
    print(rhr[0]["index"])

# input
N, T = map(int, input().split())
rhr = []
r_append = rhr.append
for i in range(1, N + 1):
    c, t = map(int, input().split())
    r_append(
        {
            "index": i,
            "cost": c,
            "time": t
        }
    )

target_routes = [
    r
    for r in rhr
    if r["time"] <= T
]

if not target_routes:
    print("TLE")
else:
    target_routes.sort(key=lambda x: x["cost"])
    print(target_routes[0]["cost"])

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):
route_num, limit = map(int, input().split(' '))

costs = []
spends = []
for i in range(route_num):
    cost, spend = map(int, input().split(' '))
    costs.append(cost)
    spends.append(spend)

max_cost = 2000
for cost, spend in zip(costs, spends):
    if spend <= limit and cost < max_cost:
        min_cost = cost

if max_cost == 2000:
    print("TLE")
else:
    print(max_cost)


route_num, limit = map(int, input().split(' '))

costs = []
spends = []
for i in range(route_num):
    cost, spend = map(int, input().split(' '))
    costs.append(cost)
    spends.append(spend)

max_cost = 2000
for cost, spend in zip(costs, spends):
    if spend <= limit and cost < max_cost:
        max_cost = cost

if max_cost == 2000:
    print("TLE")
else:
    print(max_cost)


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

root_list = []
cost = 1001
for i in range(N[0]):
    root_list.append(list(map(int,input().split())))

    if root_list[i][1] > N[1]:
        if root_list[i][0] < cost:
            cost = root_list[i][0]


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


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

root_list = []
cost = 1001
for i in range(N[0]):
    root_list.append(list(map(int,input().split())))

    if root_list[i][1] <= N[1]:
        if root_list[i][0] < cost:
            cost = root_list[i][0]


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

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())
l = [list(map(int,input().split())) for i in range(N)]
#print(l)
a = []
for i in range(N):
  if l[0][i] < T:
    a.append(l[0][i])
t = min(a)
print(t)

N,T = map(int,input().split())
l = [list(map(int,input().split())) for i in range(N)]
##print(l)
a = []
for i in range(N):
  if l[i][1] <= T:
    a.append(l[i][0])
if a != []:
  t = min(a) 
  print(t)
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):
n,t = map(int,input().split())
ct = [list(map(int,input().split())) for i in range(n)]
T = []

for h in range(n):
  T.append(ct[i][1])
  
if min(T) > t:
  print("TLE")
  exit()
else:
  for j in range(n):
    if ct[j][1] <= t:
    c = ct[j][0]
    k = j
    break
 

for i in range(k+1,n):
  if ct[i][1] <= t:
    c = min(c,ct[i][0])
    
print(c)

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

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

if tmp == (114514):
  print("TLE")
else:
  print(tmp)

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 = int(input())
T = int(input())
c_min = -1

for i in range(N):
    c = int(input())
    t = int(input())
    if t <= T:
        if c_min == -1:
            c_min = c
        else:
            if c < c_min:
                c_min = c
if c_min == -1:
    print("TLE")
else:
    print(c)

N = int(input())
T = int(input())
c_min = -1

for i in range(N):
    c = int(input())
    t = int(input())
    if t <= T:
        if c_min == -1:
            c_min = c
        else:
            if c < c_min:
                c_min = c
if c_min == -1:
    print("TLE")
else:
    print(c)

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

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=map(int,input().split())
List=[list(input().split()) for i in range(N)]
List2=[]
List3=[]
for i in List:
        List2.append([int(s) for s in i])
for i in List2:
        if i[1] <= T:
                List3.append(i[0])
        else:
                List3.append("TLE")
print(min(List3))

N,T=map(int,input().split())
List=[list(input().split()) for i in range(N)]
List2=[]
List3=[]
for i in List:
        List2.append([int(s) for s in i])
for i in List2:
        if i[1] <= T:
                List3.append(i[0])
if List3 == []:
        print("TLE")
else:
        print(min(List3))

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):
import sys
a=input()
c=a.split(" ")
c[0]=int(c[0])
c[1]=int(c[1])
b=[input().split(" ") for x in range(c[0])]

for i in range(len(b)):
    for x in range(2):
        b[i][x]=int(b[i][x])



b.sort(key=lambda x:x[1])

print(b)

if c[1] < b[0][1]:
    print("TLE")
    sys.exit()
b.sort(key=lambda x:x[0])
for i in range(len(b)):
    if b[i][1] < c[1]:
        print(b[i][0])
        break

import sys
a=input()
c=a.split(" ")
c[0]=int(c[0])
c[1]=int(c[1])
b=[input().split(" ") for x in range(c[0])]

for i in range(len(b)):
    for x in range(2):
        b[i][x]=int(b[i][x])



b.sort(key=lambda x:x[1])


if c[1] < b[0][1]:
    print("TLE")
    sys.exit()

b.sort(key=lambda x:x[0])

mini=10000000000
for i in range(len(b)):
    if b[i][1] <= c[1]:
        if b[i][0] <= mini:
            mini=i
print(b[mini][0])


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

best=-1
best_c=-1
for _ in range(N):
    c,t = map(int,input().split())
    if t <= T:
        if best_c == -1:
            best_c = c
        else if best_c > c:
            best_c = c
if best == -1:
    print("TLE")
else: 
    print(best)

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

best=-1
best_c=-1
for _ in range(N):
    c,t = map(int,input().split())
    if t <= T:
        if best_c == -1:
            best_c = c
        elif best_c > c:
            best_c = c
if best_c == -1:
    print("TLE")
else: 
    print(best_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):
a,b,k=map(int, input().split())
cnt=0
for i in range(min(a,b)+1,0,-1):
    if a%i==0 and b%i==0:
        cnt+=1
        if cnt==k:
            print(i)

n,t = map(int, input().split())
ct = [list(map(int, input().split())) for i in range(n)]
ct=sorted(ct, key=lambda cti : cti[0])
for i in range(n):
    if ct[i][1]<=t:
        print(ct[i][0])
        exit()
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):
n, t = map(int, input().split())

data = []

for i in range(n):
    tmp = input().split()
    tmp[0] = int(tmp[0])
    tmp[1] = int(tmp[1])
    data.append(tmp)

data.sort()


flg = False
for i in range(len(data)):
    if data[i][0] <= t:
        print(data[i][1])
        flg = True
        break

if not flg:
    print("TLE")

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

data = []

for i in range(n):
    tmp = input().split()
    tmp[0] = int(tmp[0])
    tmp[1] = int(tmp[1])
    data.append(tmp)

data.sort()


flg = False
for i in range(len(data)):
    if data[i][1] <= t:
        print(data[i][1])
        flg = True
        break

if not flg:
    print("TLE")

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

data = []

for i in range(n):
    tmp = input().split()
    tmp[0] = int(tmp[0])
    tmp[1] = int(tmp[1])
    data.append(tmp)

data.sort()


flg = False
for i in range(len(data)):
    if data[i][1] <= t:
        print(data[i][0])
        flg = True
        break

if not flg:
    print("TLE")

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())
d = [list(map(int, input().split())) for i in range(n)]

ans = [d[i][0] for i in range(len(d)-1) if d[i][1] <= t]
if len(ans) == 0:
    print("TLE")
else:
    print(min(ans))

n,t=map(int,input().split())
d = [list(map(int, input().split())) for i in range(n)]

ans = [d[i][0] for i in range(len(d)) if d[i][1] <= t]
if len(ans) == 0:
    print("TLE")
else:
    print(min(ans))

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

max_cost = 10 ** 9

for _ in range(n):
  c, tt = map(int, input().split())
  if tt <= t:
    max_cost = max(max_cost, c)
    
print(max_cost)

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

max_cost = 10 ** 9

for _ in range(n):
  c, tt = map(int, input().split())
  if tt <= t:
    max_cost = max(max_cost, c)
    
print(max_cost)

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

max_cost = 10 ** 9

for _ in range(n):
  c, tt = map(int, input().split())
  if tt <= t:
    max_cost = max(max_cost, c)
    
print('TLE' if max_cost == 10 ** 9 else max_cost)

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

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

Verdicts: Wrong Answer

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())
a = []
for i in range(N):
    a.append(list(map(int, input().split())))

b = []
count = 0
for i in range(N):
    if a[i][1] <= T:
        b.append(a[i][0])
if count == 0:
    print('TLE')

else:
    print(min(b))


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

b = []
count = 0
for i in range(N):
    if a[i][1] <= T:
        b.append(a[i][0])
        count += 1
if count == 0:
    print('TLE')

else:
    print(min(b))


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())
a = [int(input()) for i in range(n)]
m = 1001
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c < m:
        m = c
print(m)

n,T = map(int, input().split())
m = 1001
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c < m:
        m = c
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):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split()]
cost = []
for _ in range(N):
    c,t = [int(x) for x in input().split()]
    if t <= T:
        cost.append(c)

if cost == True:
    print(min(cost))
else:
    print("TLE")

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split()]
cost = []
for _ in range(N):
    c,t = [int(x) for x in input().split()]
    if t <= T:
        cost.append(c)

if cost is True:
    print(min(cost))
else:
    print("TLE")

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split]
cost = []
for _ in range(n):
    c,t = [int(x) for x in input().split]
    if t <= T:
        cost.append(c)

if cost == True:
    print(min(cost))
else:
    print("TLE")

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split]
cost = []
for _ in range(N):
    c,t = [int(x) for x in input().split]
    if t <= T:
        cost.append(c)

if cost == True:
    print(min(cost))
else:
    print("TLE")

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,T = [int(x) for x in input().split()]
cost = []
for _ in range(N):
    c,t = [int(x) for x in input().split()]
    if t <= T:
        cost.append(c)

if cost:
    print(min(cost))
else:
    print("TLE")

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted