Problem:


Score : 200 points

Problem Statement

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.

Constraints

All values in input are integers.

1 \leq N \leq 100

1 \leq T \leq 1000

1 \leq c_i \leq 1000

1 \leq t_i \leq 1000

The pairs (c_i, t_i) are distinct.

Input

Input is given from Standard Input in the following format:

N T
c_1 t_1
c_2 t_2
:
c_N t_N

Output

Print the smallest cost of a route that takes not longer than time T.

If there is no route that takes not longer than time T, print TLE instead.

Sample Input 1

3 70
7 60
1 80
4 50

Sample Output 1

4

The first route gets him home at cost 7.

The second route takes longer than time T = 70.

The third route gets him home at cost 4.

Thus, the cost 4 of the third route is the minimum.

Sample Input 2

4 3
1 1000
2 4
3 1000
4 500

Sample Output 2

TLE

There is no route that takes not longer than time T = 3.

Sample Input 3

5 9
25 8
5 9
4 10
1000 1000
6 1

Sample Output 3

5



Sample input:
3 70
7 60
1 80
4 50


Sample output:
4

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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]))

Submission status: Runtime Error

Solution code:
n,t = map(int, input().split())
a = []
cost = float(10000)
for i in range(n):
    a,b = list(map(int, input().split()))
    if b <= t:
        cost = min(cost, a)

print('TLE' if cost == 10000 else co

Submission status: Runtime Error

Solution code:
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=[]
    j=0
    for i in range(len(t)):
        if t[i]>time:
            p.append(i)
            j=i
            del c[i]
    #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))

Submission status: Runtime Error

Solution code:
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=[]
    j=0
    for i in range(len(t)):
        if t[i]>time:
            p.append(i)
            j=i
            del c[i]
    if len(p)==n-1:
        print(c[p[j]])
    print(min(c))

Submission status: Runtime Error

Solution code:
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)==n-1:
        print(c[p[0]])
    #print(p)
    for i in p:
        del t[i]
        del c[i]
    print(min(c))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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)
    #print(p)
    for i in p:
        del t[i]
        del c[i]
    print(min(c))

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
res=1001

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

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

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
c = []
for i in range(n):
    a,b = map(int,input().split())
    if b <= t:
        c.append(a)
print(min(c))

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
cands = [tuple(map(int,input().split())) for _ in range(n)]
cands.sort()
for c,t in cands:
  if t<= T:
    print(c)
    break
else:
  print('TLE')

Submission status: Runtime Error

Solution code:
n, limit = map(int, input().split())
cost = list()
for _ in range(n):
  c, time = [int(a) for a in input().split()]
  if time <= limit:
    cost.append(c)
print(max(cost))

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
lists=[list(map(int,input().split())) for x in range(N)]
ans=[]
for list in lists:
  if list[1]<=T:
    ans.append(list)
ans.sort(key=lambda x:x[0])
print(ans[0][0])

Submission status: Runtime Error

Solution code:
n,T = list(map(int,input().split()))
ans = 10000
for i in range(n):
  c,t = map(int,input().split())
  if(t<=T):
    ans=min(ans,c)
  else:
    None
if(ans = 10000):
  print("TLE")
else:
  print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# 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)

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
ct = list()
for _ in range(N):
  s, t = map(int,i)nput().split
  if t <= T:
    ct.append(s, t)
#ct = [input().split() for _ in range(N)]

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,t=map(int,input().split())
c,t=[list(map(int,input().split())) for _ in range(n)]
l=[]
for i in range(n):
  if t[i]<=t:
    l.append([c[i],t[i]])
    if len(l)==0:
      print('TLE')
    else:
      l.sort()
      print(l[0][0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())

ct=[input().split() for a in range(N)]
if int(ct[1])<=T:
    z=[y for y in ct]
    if len(z)==0:
        print("TLE") 
    else:
        print(min(z)[0])

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
cc=1000
for i in range(N):
  c,t=map(int,input().split())
  if cc>c and T=>t:
    cc=c
if cc==1000:
  print("TLE")
else:
  print(cc)

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
n, t = map(int,input().split())
ans = []

for i in range(n):
  c, x = map(int,input().split())
  if x <= t:
    ans.append(c)
    
ans.sort()
print(ans[0])

Submission status: Runtime Error

Solution code:
n = int(input())
if n == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a+b)

Submission status: Runtime Error

Solution code:
n, T = map(int, input().split())
out = list()
for _ in range(n):
    c, t = map(int, input().split())
    if t > T: continue
    out.append((c, t))
print(min(out)[0]) if min(out)[0] < T else print("TLE")

Submission status: Runtime Error

Solution code:
n, t = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
x = []
for i in range(n):
     if a[i][1] <= t:
          x.append(a[i][0])
print(min(x))

Submission status: Runtime Error

Solution code:
N, T = map(int, input().split())
for i in range(N):
    c, 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)

Submission status: Runtime Error

Solution code:
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])
t = min(a)
print(t)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, T = map(int, input().split())
ans = 'TLE'
cost = float('inf')

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

print(ans)

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
ls = [list(map(int,input().split())) for i in range(n)]
ls1 = []
for i in range(n):
    if ls[i][1] <= t:
        ls1.append(ls[i][0])
print(min(ls1))

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

if not x:
  print("TLE")

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

if len(x) == 0:
  print("TLE")

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sotr()

print(x[0])

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
cost = []
time = []
ncost = []
for i in range(n):
    c,T = input().split()
    cost.append(int(c))
    time.append(int(T))

    
for i in range(n):
    if time[i] <= t:
        ncost.append(cost[i])
    elif all(time) > t:
        print('TLE')
    else:
        pass
    
print(min(ncost))

Submission status: Runtime Error

Solution code:
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
  c[i], t[i] = map(int, input().split())
 
costs = []
for i in range(N):
  if t[i] <= T:
    costs.append(c[i])
    
print(min(costs))

Submission status: Runtime Error

Solution code:
N, T = map(int, input().split())
c = []
t = []
c[i], t[i] = map(int, input().split())
 
costs = []
for i in range(N):
  if t[i] <= T:
    costs.append(c[i])
    
print(min(costs))

Submission status: Runtime Error

Solution code:
N, T = map(int, input().split())
c, t = list(map(int, input().split()))

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

Submission status: Runtime Error

Solution code:
n,t=map(int,input().split())
c_t=[list(map(int,input().split())) for _ in range(n)]
ans=[]
for i in range(n):
    if c_t[i][1]<=t:
        ans.append(c_t[i][0])
print(min(ans))

Submission status: Runtime Error

Solution code:
n,t=map(int,input().split())
ct=[list(map(int,input().split())) for i in range(n)]
ct=[i for i in ct if i[1]<=t]
ct.sort()
print(ct[0][0])

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
N, T = map(int, input().split())
C = []
for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    C.append(c)
C.sort()
print(C[0])

Submission status: Runtime Error

Solution code:
N,T = int(x) for x in input().split()
C = 2000
for i in range(N):
  c,t = int(x) for x in input().split()
  if t <= T:
    C = min(c,C)
    
if C == 2000:
  print("TLE")
else: print(C)

Submission status: Runtime Error

Solution code:
N,T = int(input().split())
C = 2000
for i in range(N):
  c,t = int(input().split())
  if t <= T:
    C = min(c,C)
    
if C == 2000:
  print("TLE")
else: print(C)

Submission status: Runtime Error

Solution code:
n ,t = [int(x) for x in input().split()]
arr = [list(map(int, input().split())) for _ in range(n)]

ans = 9999
for i in range(n):
    if arr[i][1] <= t:
        if arr[i][0] <= ans:
            ans = arr[i][0]
if ans = 9999:
    print("TLE")
else:
    print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
n,t=map(int,input().split())
l=[]
for i in range(n):
	c,time=map(int,input().split())
	if time<=t:
		l.append(c)
print(min(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, t = map(int, input().split())
c_t = [list(map(int, input().split())) for _ in range(n)]

cost = []

for i in range(n):
    if c_t[i][1] <= t:
        cost.append(c_t[i][0])
print(min(cost))

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
ct = [list(map(int,input().split())) for i in range(N)]
ct = sorted([i for i in ct if i[1]<= T])
print(ct[0][0])

Submission status: Runtime Error

Solution code:
N, T = [int(i) for i in input().split()]


min_cost = 1001
for c, t in [input().split() for _ in range(N)]
    c, t = int(c), int(t)
    if t > T:
        continue
    min_cost = min(min_cost, c)

ans = min_cost if min_cost < 1001 else "TLE"
print(ans)

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
c = []
t = []
for i in range(N):
  a,b = map(int,input().split())
  c.append(a)
  t.append(b)
result = []
for j in range(N):
  if T >= t[j]:
    result.append(c[j])
  else:
    None
print(min(result))

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
c = []
t = []
for i in range(N):
  a,b = map(int,input(),split())
  c.append(a)
  t.append(b)
result = []
for j in range(N):
  if T >= t[j]:
    result.append(c[j])
  else:
    None
print(min(result))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
ls=[int(input()) for _ in range(N)]
ans=10**18
for i in ls:
  if i[1] <= T:
    ans = min(ans,i[0])
if ans < 10**18:
  print(ans)
else:
  print('TLE')

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
ls=[int(input()) for _ in range(N)]
ans=10**18
for i in ls:
  if i[0] <= T:
    ans = min(ans,i[1])
if ans < 10**18:
  print(ans)
else:
  print('TLE')

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
ls=[int(input()) for _ in range(N)]
ans=10**18
for c,t in ls:
  if t <= T:
    ans = min(ans,c)
if ans < 10**18:
  print(ans)
else:
  print('TLE')

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
ls=[int(input()) for _ in range(N)]
ans='TLE'
for c,t in ls:
  if t <= T:
    ans = min(ans,c)
    
print(ans)

Submission status: Runtime Error

Solution code:
nums = list(map(int, input().split())) # "1 2 3"と入力
n = nums[0]
t = nums[1]
minC = 1001
for i in range(n):
    numss = list(map(int, input().split()))
    c = numss[0]
    ti = numss[1]
    if ti <= t and minC > c:
        minC = c
if minC = 1001:
    print('TLE')
else:
    print(minC)

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
list_aaa = [list(map(int,input().split())) for i in range(N)]

min_aaa =1001

for i in range(N):
    if T>= list_aaa[i][1]:
        min_aaa = min(min_aaa,list_aaa[i][1])

if min_aaa ==1001:
    print(TLE)
else:
    print(min_aaa)

Submission status: Runtime Error

Solution code:

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

A = []
for i in range(n):
    c,ti  =  (int(x) for x in input().split())
    A.append([c,ti])

B = []
for i in A:
    if A[1] < t:
        B.append(i)

if len(B):
    B.sort(key=lambda x: x[0])
    print(B[0])
else:
    print("TLE")

Submission status: Runtime Error

Solution code:
n,T=map(int,input().split())
ans=[]
for i in range(n):
    c,t=map(int,input().split())
    if t<=T:
        ans.append(c)
print(min(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
import bisect

n,t = [int(x) for x in stdin.readline().rstrip().split()]
li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
li2 = []
for i in range(n):
    if li[i][0] <= t:
        li2.append(li[i][0])

li2.sort()

print(li2[0])

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
a = [list(map(int,input().split())) for _ in range(N)]
x=[]
for i in range(N):
  if a[i][1]<=T:
    x.append(a[i])
if len(x)==0:
  print("TLE")
else:
  x.sort(key=lambda x:x[0])
print(x[0][0])

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
a = [list(map(int,input().split())) for _ in range(N)]
x=[]
for i in range(N):
  if a[i][1]<=T:
    x.append(a[i])
if len(x)==0:
  print("TLE")
else:
  x.sort(key=lambda x:x[0])
print(x[0][0])

Submission status: Runtime Error

Solution code:
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 len(c) > 0:
    print(min(c))        
else:
    print("TLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,T = map(int, input())
ans = 1000
for i in range(n):
  c,t = map(int, input())
  if t <= T:
    ans = min(ans, c)
print(ans)

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
ct=[tuple(map(int,input().split())) for i in range(n)]
ans=10**9
for c,t in ct:
    if T<t:
        continue
    else:
        ans=min(ans,c)
print(ans if ans!=10**9 else 'TLE')

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
C = []
for _ in range(a):
  c, t = map(int, input().split())
  if t <= b:
    C.append(c)
print(min(C))

Submission status: Runtime Error

Solution code:
N,T = map(int,input().split())
c = []
t = []
c1,t1 = [int(i) for i in input().split()]
for i in range(N):
  c.append(n1)
  t.append(t1)
ans = 10000
for i in range(N):
  if t[i] <= T:
    ans = min(ans,c[i])
if ans == 10000:
  print('TLE')
else:
  print(ans)

Submission status: Runtime Error

Solution code:
n, T = map(int, input().split())

keep_cost = 1001

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


print(keep_cost if keep_cos != 1001 else "TLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

input = sys.stdin.readline


def main():
    n, t = map(int, input().split())
    routes = filter(
        lambda x: x[1] <= t, [list(map(int, input().split())) for _ in range(n)]
    )
    if routes:
        print(min(routes)[0])
    else:
        print("TLE")


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
n,t=map(int,input().split())
s=[map(int,input().split()) for i in range(n)]
for i in range(n):
    if s[i][1]>t:
        s.remove(s[i])
print(min(s[:][0]))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,T = [int(x) for x in input().split()]
ans =100000000
for i in range(N):
  c,t =[int(x) for x in input().split()]
  if t<=T:
    ans = min(c,ans)
if ans!=100000000
    print(ans)
else:
  print("TLE")

Submission status: Runtime Error

Solution code:
n,T=map(int,input().split())
clist,tlist=[],[]
for i in range(n):
  c,t=map(int,input().split())
  clist.append(c)
  tlist.append(t)

ans=10100
flag=False
for d,e in zip(c,t):
  if e<=T:
    ans=min(ans,d)
    flag=True
if flag == False:
  print("TLE")
else:
  print(ans)

Submission status: Runtime Error

Solution code:
n,T=map(int,input().split())
clist,tlist=[],[]
for i in range(n):
  c,t=map(input().split())
  clist.append(c)
  tlist.append(t)

ans=10100
flag=False
for d,e in zip(c,t):
  if e<=T:
    ans=min(ans,d)
    flag=True
if flag == False:
  print("TLE")
else:
  print(ans)

Submission status: Runtime Error

Solution code:
[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))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,T= map(int,input().split())

c=[]
t=[]

for _ in range(N):
	C,T=map(int,input().split())
	c.append(C)
	t.append(T)
	
for j in range(N):
	if t[j]>T:
		c[j]=1001

if min(c)=1001:
	print("TLE")

else:
	print(min(c))

Submission status: Runtime Error

Solution code:
N, T = map(int, input.split())
c_max = 1001

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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])
print(min(A))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
N, T = map(int, sys.stdin.readline().strip().split())  # N個の帰宅経路, T時間以内に

cost = 1001
for line in sys.stdin.readlines():
    c, t = line.strip().split()
    if T >= t:
        cost = min(cost, c)

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

Submission status: Runtime Error

Solution code:
N, T = map(int, input().split())
ans = []
for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    ans.append(c)
ans.sort()
print(ans[0])

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
ct = [[0,0] for i in range N]
for i in range(N):
  ct[i]=list(map(int,input().split()))
ct.append([-1,T])
ct.sort(reverse=True,key=lambda x:x[1])
index = ct.index([-1,T])
if index==0:
  print("TLE")
else:
  ans = sorted(ct[:index],key=lambda x:x[0])
  print(ans[0][0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
N,T = map(int,input().split())
score = math.inf
for i in range(N):
    c,t = map(int,input().split())
    if t<=T: score = min(score,c)
        
print("TLE" if score==math.inf else score)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
ct = [list(map(int,input().split())) for i in range(n)]

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)

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
ct = [list(map(int,input().split())) for i in range(n)]

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)

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
ct = [list(map(int,input().split())) for i in range(n)]
C = []
T1 = []

for i in range(n):
  C.append(ct[i][0])
  T1.append(ct[i][1])

if min(T1) >= t:
  print("TLE")

for i in range(n):
  mc = min(C)
  if ct[C.index(min(C))][1] >= t:
    C.remove(min(C))
    ct.remove(ct[C.index(min(C))])
  else:
    break
    
print(min(C))

Submission status: Runtime Error

Solution code:
n,t = map(int,input().split())
ct = [list(map(int,input().split())) for i in range(n)]
C = []
T1 = []

for i in range(n):
  C.append(ct[i][0])
  T1.append(ct[i][1])

if min(T1) > t:
  print("TLE")

for i in range(n):
  mc = min(C)
  if ct[C.index(min(C))][1] > t:
    C.remove(min(C))
    ct.remove(ct[C.index(min(C))])
  else:
    break
    
print(min(C))

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
cl=[]
tl=[]
for i in range(a):
    c,t = map(int, input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
cl=[]
tl=[]
for i in range(a):
    c,t=map(int,input().split())
    cl.append(c)
    tl.append(t)
    
ind=0
resut_list=[]
for p in range(a):
    if tl[ind]<=b:
        resut_list.append(cl[ind])
    ind+=1    

print(min(resut_list))

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
list=[input() for _ in range(N)]

list1=[]
for i in range(N):
    X,Y=map(int,list[i].split(" "))
    if Y <= T:
        list1.append(X)
print(min(list1))

Submission status: Runtime Error

Solution code:
N,T=map(int,input().split())
list=[input() for _ in range(N)]

list1=[]
for i in range(N):
    X,Y=map(int,list[i].split(" "))
    if Y < T:
        list1.append(X)
print(min(list1))

Submission status: Runtime Error

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