qyliang/CodeNanoFix huggingface dataset:
Buggy code:
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')

Fixed code:
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')
Buggy code:
#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]

if c_min == 1001:
    print('TEL')
else:
    print(c_min)


Fixed code:
#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')
Buggy 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)

Fixed 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)
Buggy code:
N, T = map(int, input().split())
c_min = 1001

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

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

Fixed code:
N, T = map(int, input().split())
c_min = 1001

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

if c_min == 1001:
  print('TLE')
else:
  print(c_min)
Buggy code:
N, T = map(int, input().split())
cost = []
time = []
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost.append(c)
        time.append(t)
if len(time) == 0:
    print("TLE")
else:
    min_time_index = time.index(min(time))
    print(cost[min_time_index])

Fixed code:
N, T = map(int, input().split())
cost = []
time = []
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost.append(c)
        time.append(t)
if len(time) == 0:
    print("TLE")
else:
    #min_time_index = time.index(min(time))
    #print(cost[min_time_index])
    print(min(cost))
Buggy code:
N,T = map(int,input().split())
c = [0]*N 
cost = 1001
for i in range(N):
    tmp_c,tmp_t = map(int,input().split())
    if tmp_t <= T:
        cost = min(tmp_c,cost)
print(cost)

Fixed code:
N,T = map(int,input().split())
c = [0]*N 
cost = 1001
for i in range(N):
    tmp_c,tmp_t = map(int,input().split())
    if tmp_t <= T:
        cost = min(tmp_c,cost)
if cost == 1001:
    cost = "TLE"
print(cost)
Buggy code:
n,t=map(int,input().strip().split(" "))
c=[]

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

Fixed code:
n,t=map(int,input().strip().split(" "))
c=[]
time=[]
for i in range(n):
    a,b=map(int,input().strip().split(" "))
    if b<=t:
        c.append(a)
if c==[]:
    print("TLE")
else:
    print(min(c))
Buggy code:
N, T = [int(i) for i in input().split()]
ans = 1500
for i in range(N):
    c1, c2 = [int(j) for j in input().split()]

    if c2 <= T:
        ans = min(c1,ans)

if ans == 1500:
    ans = "LTE"
print(ans)

Fixed code:
N, T = [int(i) for i in input().split()]
ans = 1500
for i in range(N):
    c1, c2 = [int(j) for j in input().split()]

    if c2 <= T:
        ans = min(c1,ans)

if ans == 1500:
    ans = "TLE"
print(ans)
Buggy code:
n, m = map(int, input().split())
ans = 999999
for _ in range(n):
  c, t = map(int, input().split())
  if t > m:
    continue
  ans = min(ans, c)
if ans = 999999:
  print('TLE')
else:
  print(ans)

    

Fixed code:
n, m = map(int, input().split())
ans = 999999
for _ in range(n):
    c, t = map(int, input().split())
    if t > m:
        continue
    ans = min(ans, c)
if ans == 999999:
    print('TLE')
else:
    print(ans)
Buggy code:
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"):
    print("TLE")
else:
    print(ans)

Fixed code:
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"):
    print("TLE")
else:
    print(ans)
Buggy code:
N, T = map(int,input().split())
mincost = 1001
for i in range(1, N+1):
    c, t = map(int,input().split())
    if t <= T:
        cost = c
        if cost < mincost:
            mincost = cost

if mincost == 1000:
  print('TLE')
if mincost < 1000:
  print(mincost)


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

if mincost == 1001:
  print('TLE')
if mincost < 1001:
  print(mincost)
Buggy code:
N,T=map(int,input().split())
ct=[0]*N
cost=[]
for i in range(N):
  ct[i]=list(map(int,input().split()))
  if ct[i][1]<T :
    cost.append(ct[i][0])
print(min(cost))

Fixed code:
N,T=map(int,input().split())
ct=[0]*N
cost=[]
for i in range(N):
  ct[i]=list(map(int,input().split()))
  if ct[i][1]<=T :
    cost.append(ct[i][0])
if cost==[] :
  print("TLE")
else :
  print(min(cost))
Buggy code:
n,t=map(int,input().split())
cost_list=[]
for i in range(n):
  cost,time=map(int,input().split())
  if time<=t:
    cost_list+=cost
if cost_list=![]:
  print(min(cost_list))
else:
  print(TLE)

Fixed code:
n,t=map(int,input().split())
cost_list=[]
for i in range(n):
  cost,time=map(int,input().split())
  if time<=t:
    cost_list+=[cost]
if cost_list!=[]:
  print(min(cost_list))
else:
  print("TLE")
Buggy code:
def time_limit_exceeded(N: int, T: int, CT: list) -> int:
    min_cost = float('inf')
    for c, t in CT:
        if t > T:
            continue
        if min_cost > c:
            min_cost = c
    return c


if __name__ == "__main__":
    N, T = map(int, input().split())
    CT = [tuple(int(s) for s in input().split()) for _ in range(N)]
    ans = time_limit_exceeded(N, T, CT)
    print(ans)


Fixed code:
def time_limit_exceeded(N: int, T: int, CT: list) -> int:
    min_cost = float('inf')
    for c, t in CT:
        if t > T:
            continue
        if min_cost > c:
            min_cost = c
    return min_cost


if __name__ == "__main__":
    N, T = map(int, input().split())
    CT = [tuple(int(s) for s in input().split()) for _ in range(N)]
    ans = time_limit_exceeded(N, T, CT)
    print(ans if ans != float('inf') else 'TLE')
Buggy code:
i=lambda:map(int,input().split());N,T=i();print(min([0]+[c for c,t in[i()for _ in[0]*N]if t<=T])or'TLE')

Fixed code:
i=lambda:map(int,input().split());N,T=i();print(min([c for c,t in[i()for _ in[0]*N]if t<=T],default='TLE'))
Buggy code:
n,t=[int(s)for s in input().split()]
cost=[]
for _ in range(n):
  c,ti=[int(s)for s in input().split()]
  if ti<t:cost.append(c)
if len(cost)==0:print("TLE")
else:
  cs=cost.sorted()
  print(cs[0])

Fixed code:
n,t=[int(s)for s in input().split()]
cost=[]
for _ in range(n):
  c,ti=[int(s)for s in input().split()]
  if ti<=t:cost.append(c)
if len(cost)==0:print("TLE")
else:
  cs=sorted(cost)
  print(cs[0])
Buggy code:
N,T=list(map(int,input().split()))
min_=1111
for i in range(N):
    c,t=list(map(int,input().split()))
    if t <=T:
        if min_>c:
            min_=c
print(min_)

Fixed code:
N,T=list(map(int,input().split()))
min_=1111
for i in range(N):
    c,t=list(map(int,input().split()))
    if t <=T:
        if min_>c:
            min_=c
if min_==1111:
    min_='TLE'
print(min_)
Buggy code:
n, t = map(int, input().split())
l = [input().split() for i in range(n)]
l.sort()
exist = False

for i in l:
  if int(i[1]) < t:
    print(i[0])
    exist = True
    break
if !(exist):
  print("TLE")

Fixed code:
n, t = map(int, input().split())
l = [list(map(int, input().split())) for i in range(n)]
l.sort()
exist = False

for i in l:
  if int(i[1]) <= t:
    print(i[0])
    exist = True
    break
if not exist:
  print("TLE")
Buggy code:
n,t = map(int,input().split())

a = []

for i in range(n):
    a.append(list(map(int,input().split())))

min = 1000

for i in a:
    if i[1] <= t and i[0] < min:
        min = i[0]

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


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

a = []

for i in range(n):
    a.append(list(map(int,input().split())))

min = 9999

for i in a:
    if i[1] <= t and i[0] < min:
        min = i[0]

if min > 1000:
    print("TLE")
else:
    print(min)
Buggy code:
n, tx = input().strip().split(' ')
n, tx = [int(n),int(tx)]

c_ans = 1001
for i in range (n):
    c, t = input().strip().split(' ')
    c, t = [int(c),int(t)]
    if c < c_ans and t < tx:
        c_ans = c
if c_ans == 1001:
    print('TLE')
else:
    print(c_ans)


Fixed code:
n, tx = input().strip().split(' ')
n, tx = [int(n),int(tx)]

c_ans = 1001
for i in range (n):
    c, t = input().strip().split(' ')
    c, t = [int(c),int(t)]
    if c < c_ans and t <= tx:
        c_ans = c
if c_ans == 1001:
    print('TLE')
else:
    print(c_ans)
Buggy 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')

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

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

Fixed code:
# -*- 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)
Buggy code:
n, t = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
ans = float('inf')
for i in range(n):
    if a[i][1] <= t:
        ans = min(ans, a[i][0])
print(ans)


Fixed code:
n, t = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
inf  = float('inf')
ans = inf
for i in range(n):
    if a[i][1] <= t:
        ans = min(ans, a[i][0])
if ans == inf:
    print("TLE")
else:
    print(ans)
Buggy code:
a=[]
b=1000
n,t=map(int,input().split(" "))
for _ in range(n+1):
    a.append(tuple(map(int,input().split(" "))))
for i in range(n+1):
    if t>=a[i][1]:
        if b>a[i][0]:
            b=a[i][0]
if b !=1000:
    print(b)
else:
    print("TLE")

Fixed code:
a=[]
b=1001
n,t=map(int,input().split(" "))
for _ in range(n):
    a.append(tuple(map(int,input().split(" "))))
for i in range(n):
    if t>=a[i][1]:
        if b>a[i][0]:
            b=a[i][0]
if b !=1001:
    print(b)
else:
    print("TLE")
Buggy code:
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))

Fixed code:
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))
Buggy code:
n,T = map(int, input().split())
ans = float('inf')
flag = True
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c <= ans:
        ans = c
        flag = False
if flag:
    print("TLE")
else:
    print("ans")

Fixed code:
n,T = map(int, input().split())
ans = float('inf')
flag = True
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c <= ans:
        ans = c
        flag = False
if flag:
    print("TLE")
else:
    print(ans)
Buggy 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)

Fixed 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)
Buggy 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)

Fixed code:
N,T = map(int,input().split())
c = []
t = []
for i in range(N):
    c1,t1 = [int(i) for i in input().split()]
    c.append(c1)
    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)
Buggy code:
n, t = map(int, input().split())
li = []
for i in range(0, n):
    li.append(list(map(int,input().split())))

cost = 1001

for i in li:
    if t > i[1]:
        if cost > i[0]:
            cost = i[0]

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


Fixed code:
n, t = map(int, input().split())
li = []
for i in range(0, n):
    li.append(list(map(int,input().split())))

cost = 1001

for i in li:
    if t >= i[1]:
        if cost > i[0]:
            cost = i[0]

if cost == 1001:
    print('TLE')
else:
    print(cost)
Buggy code:
N, T = map(int, input().split())
L = [list(map(int, input().split())) for i in range(N)]

res = 10000

for i in range(N):
  if L[1] <= T:
    if res > L[0]:
      res = L[0]
     
if res == 10000:
  res = 'TLE'
print(res)

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

res = 10000

for i in range(N):
  if L[i][1] <= T:
    if res > L[i][0]:
      res = L[i][0]
     
if res == 10000:
  res = 'TLE'
print(res)
Buggy code:
N, T = map(int, input().split())

c = [0] * N
t = [0] * N

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

min = 1001
for i in range(N):
    if(t[i] < T ):
        if(min > c[i]):
            min = c[i]

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



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

c = [0] * N
t = [0] * N

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

min = 1001
for i in range(N):
    if(t[i] <= T ):
        if(min > c[i]):
            min = c[i]

if(min == 1001):
    print("TLE")
else:
    print(min)
Buggy code:
N, T = map(int, input().split())

ans = 10 ** 9

for _ in rnage(N):
    a, b = map(int, input().split())
    if b <= T:
        ans = min(ans, b)

if ans == 10 ** 9:
    print('TLE')
else:
    print(ans)

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

ans = 10 ** 9

for _ in range(N):
    a, b = map(int, input().split())
    if b <= T:
        ans = min(ans, a)

if ans == 10 ** 9:
    print('TLE')
else:
    print(ans)
Buggy code:
N, T = map(int, input().split())

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

if res <= T:
    print(res)
else:
    print("TLE")


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

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

if res < 10 ** 9:
    print(res)
else:
    print("TLE")
Buggy 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)

Fixed code:
n, T = [int(i) for i in input().split()]
mn = 10000
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)
Buggy code:
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')

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

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


Fixed code:
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))
Buggy 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)

Fixed 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)
Buggy code:
N, T = map(int, input().split())
c, t = list(map(int, input().split()))
ans = 1000
i = 0
for i in range(N):
    if T > t and c < ans:
        ans = c

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

Fixed code:
N, T = map(int, input().split())
i = 0
ans = 1001
for i in range(N):
    c, t = map(int, input().split())
    if T >= t and c < ans:
        ans = c

if ans == 1001:
    print("TLE")
else:
    print(ans)
Buggy code:
n, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]
li = []
for i in ct:
    if i[1] <= T:
        li.append(i[0])
if len(li) != 0:
    print(min(sorted(li)))
else:
    print('TEL')

Fixed code:
n, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]
li = []
for i in ct:
    if i[1] <= T:
        li.append(i[0])
if len(li) != 0:
    print(min(sorted(li)))
else:
    print('TLE')
Buggy code:
n, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]

ans = []
for i in ct:
    if i[1] <= T:
        ans.append(i[0])
if len(ans) == 0:
    print('TEL')
else:
    print(min(ans))

Fixed code:
n, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]

ans = []
for i in ct:
    if i[1] <= T:
        ans.append(i[0])
if len(ans) == 0:
    print('TLE')
else:
    print(min(ans))
Buggy code:
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

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


Fixed code:
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

if len(c) == 0:
  print("TLE")
else:
  print(min(c))
Buggy 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)

Fixed code:
N, T = map(int, input().split())
ans = float('inf')
cost = 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(ans)
else:
  print('TLE')
Buggy 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")



Fixed 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)   
print(min(C) if len(C)>0 else 'TLE')
Buggy code:
s=list(input().split())
n=int(s[0])
l=int(s[1])
cost=[]
time=[]

for i in range(n):
  li=list(input().split())
  if int(li[1])<l:
    cost.append(int(li[0]))
    time.append(int(li[1]))
if len(cost)==0:
  print('TLE')
else:
  print(min(cost))

Fixed code:
s=list(input().split())
n=int(s[0])
l=int(s[1])
cost=[]
time=[]

for i in range(n):
  li=list(input().split())
  if int(li[1])<=l:
    cost.append(int(li[0]))
    time.append(int(li[1]))
if len(cost)==0:
  print('TLE')
else:
  print(min(cost))
Buggy code:
n, t = map(int, input().split())
costs=[]
time = []
for i in range(n):
    new_cost, new_time = map(int, input().split())
    if new_time<t:
        costs.append(new_cost)
        time.append(new_time)
    else:
        continue
print(min(costs))

Fixed code:
n, t = map(int, input().split())
costs=[]
time = []
for i in range(n):
    new_cost, new_time = map(int, input().split())
    if new_time<=t:
        costs.append(new_cost)
        time.append(new_time)
    else:
        continue
if costs ==[]:
    print('TLE')
else:
    print(min(costs))
Buggy code:
N,T=map(int,input().split())
ans=10000000000
for i in range(N):
  c,t=map(int,input().split())
  if t<=T and c<ans :
    ans=c
if ans>10000000000:
  ans='TLE'
else:
  print(ans)

Fixed code:
N,T=map(int,input().split())
ans=10000000000
for i in range(N):
  c,t=map(int,input().split())
  if t<=T and c<ans :
    ans=c
if ans==10000000000:
  ans='TLE'
  print(ans)
else:
  print(ans)
Buggy code:
N, T = map(int, input().split())
ret = 1001

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

if ret == 1001:
    print('TLE')
else:
    print(c)


Fixed code:
N, T = map(int, input().split())
ret = 1001

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

if ret == 1001:
    print('TLE')
else:
    print(ret)
Buggy code:
def solve(string):
    n, t, *ct = map(int, string.split())
    c = [_c for _c, _t in zip(ct[::2], ct[1::2]) if _t <= t]
    return str(min(c)) if len(c) else "TLE"


if __name__ == '__main__':
    n, t = map(int, input())
    print(solve("{} {}\n".format(n, t) + "\n".join([input() for _ in n])))


Fixed code:
def solve(string):
    n, t, *ct = map(int, string.split())
    c = [_c for _c, _t in zip(ct[::2], ct[1::2]) if _t <= t]
    return str(min(c)) if len(c) else "TLE"


if __name__ == '__main__':
    n, t = map(int, input().split())
    print(solve("{} {}\n".format(n, t) + "\n".join([input() for _ in range(n)])))
Buggy code:
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
    tmp1, tmp2 = map(int, input().split())
    c.append(tmp1)
    t.append(tmp2)

tmp_min = 10**5

for i in range(N):
    if t[i]<T and tmp_min>c[i]:
        tmp_min = c[i]

if tmp_min>T:
    print('TLE')
else:
    print(tmp_min)

Fixed code:
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
    tmp1, tmp2 = map(int, input().split())
    c.append(tmp1)
    t.append(tmp2)

tmp_min = 10**5

for i in range(N):
    if t[i]<=T and tmp_min>c[i]:
        tmp_min = c[i]

if tmp_min == 10**5:
    print('TLE')
else:
    print(int(tmp_min))
Buggy code:
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
    tmp1, tmp2 = map(int, input().split())
    c.append(tmp1)
    t.append(tmp2)

tmp_min = float('inf')

for i in range(N):
    if t[i]<=T and tmp_min>c[i]:
        tmp_min = c[i]

if tmp_min == float('inf'):
    print('TLE')
else tmp_min<=T:
    print(int(tmp_min))


Fixed code:
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
    tmp1, tmp2 = map(int, input().split())
    c.append(tmp1)
    t.append(tmp2)

tmp_min = float('inf')

for i in range(N):
    if t[i]<=T and tmp_min>c[i]:
        tmp_min = c[i]

if tmp_min == float('inf'):
    print('TLE')
else:
    print(int(tmp_min))