qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N, T = LI()
    ans = inf
    for i in range(N):
        c, t = LI()
        if t <= T:
            ans = min(ans, c)
    print(ans)

main()



Fixed code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N, T = LI()
    ans = inf
    for i in range(N):
        c, t = LI()
        if t <= T:
            ans = min(ans, c)
    if ans == inf:
        print("TLE")
        return
    print(ans)

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

Fixed 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(clist,tlist):
  if e<=T:
    ans=min(ans,d)
    flag=True
if flag == False:
  print("TLE")
else:
  print(ans)
Buggy code:
N, T = map(int, input().split())

INF = 10001
minimum = INF
for i in range(N):
    c,t = map(int, input())
    if t <= T:
        minimum = min(minimum, c)

if minimum == INF:
    print('TLE')
else
    print(minimum)



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

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

if minimum == INF:
    print('TLE')
else:
    print(minimum)
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(c, m)
if m == 1001:
  print("TLE")
else:
  print(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(c, m)
if m == 1001:
  print("TLE")
else:
  print(m)
Buggy code:
N, T = [int(i) for i in input().split(" ")]
c = []
t = []

for i in range(N):
    t = [int(i) for i in input().split(" ")]
    if t[1] <= T:
        c.append(t[0])
        t.append(t[1])

print(min(c))

Fixed code:
N, T = [int(i) for i in input().split(" ")]
c = []
t = []

for i in range(N):
    t = [int(i) for i in input().split(" ")]
    if t[1] <= T:
        c.append(t[0])
        t.append(t[1])

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

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

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

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


Fixed 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')
Buggy code:
n,t = map(int,input().split())
lst = [[int(i) for i in input().split()] for i in range(n)]

cst = 'TLE'
for i in range(n):
    if lst[i][1] < t:
        if cst == 'TLE':
            cst = lst[i][0]
        elif lst[i][0] < cst:
            cst = lst[i][0]
print(cst)

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

cst = 'TLE'
for i in range(n):
    if lst[i][1] <= t:
        if cst == 'TLE':
            cst = lst[i][0]
        elif lst[i][0] < cst:
            cst = lst[i][0]
print(cst)
Buggy code:
Tmp = []
Tmp = input().rstrip().split(' ')

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

nCost = 1001
nAns = 0

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

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

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

    

  

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

if nAns == 0:
  print('TLE')
else:
  print(nCost)
Buggy code:
N,K=[int(s) for s in input().split()]
m=10000
n=10000
for i in range(N):
  a,b=[int(s) for s in input().split()]
  if b<K:
    n=min([n,a])
if m==10000:
  print("TLE")
else:
  print(a)
    

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

Fixed code:
n,t = map(int,input().split())
ansseq=[]
for i in range(n):
  a,b = map(int,input().split())
  if b <= t:
    ansseq.append(a)
if len(ansseq) == 0:
  print("TLE")
else:
  print(min(ansseq))
Buggy code:
N,Time=map(int,input().split())
C=[]
T=[]
for _ in range(N):
    c,t=map(int,input().split())
    C.append(c)
    T.append(t)

tmp=[]
for i in range(N):
    if T[i]<=Time:
        tmp.append(C[i])
print(min(tmp))

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

Fixed code:
N,Time=map(int,input().split())
C=[]
T=[]
for _ in range(N):
    c,t=map(int,input().split())
    C.append(c)
    T.append(t)

tmp=[]
for i in range(N):
    if T[i]<=Time:
        tmp.append(C[i])
if tmp==[]:
    print('TLE')
else:
    print(min(tmp))
Buggy code:
n, t = map(int, input().split())
ans = float("inf")

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

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

Fixed code:
n, t = map(int, input().split())
ans = float("inf")

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

if ans == float("inf"):
    print("TLE")
else:
    print(ans)
Buggy code:
N,T = map(int, input().split())
ct = [list(map(int, input().split())) for i in range(N)]
s_ct = sorted(ct)

for item in s_ct:
    if item[1] <= T:
        print(item[0])
        exit()
        

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

for item in s_ct:
    if item[1] <= T:
        print(item[0])
        exit()

print('TLE')
Buggy 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)
c.sort();print(c[0])

Fixed 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)
if c==[]:print("TLE")
else:c.sort();print(c[0])
Buggy code:
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")

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

Fixed code:
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))
Buggy code:
n,t=map(int,input().split())
a=[]
b=[]
for i in range(n):
  a.append(int(input()))
  b.append(int(input()))
c=[]
for j in range(n):
  if b[j]>t:
    c.append(1001)
  else:
    c.append(a[j])
if c==[1001]*n:
  print('TLE')
else:
  print(min(c))

    

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

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

min_c = inf
for i in c_t:
    if i[1] <= t:
        min_c = min(min_c, i[0])

if min_c == t+1:
    print("TLE")
else:
    print(min_c)

Fixed code:
import math
inf = float('inf')

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

min_c = inf
for i in c_t:
    if i[1] <= t:
        min_c = min(min_c, i[0])

if min_c == inf:
    print("TLE")
else:
    print(min_c)
Buggy code:
N, T = [int(i) for i in input().split()]
C = []

for i in range(N):
    C.append([int(i) for i in input().split()])

min = T
res = []

for c in C:
    cost = c[0]
    time = c[1]
    if time <= min:
        res.append(cost)
    

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

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

for i in range(N):
    C.append([int(i) for i in input().split()])

x = T
res = []

for c in C:
    cost = c[0]
    time = c[1]
    if time <= x:
        res.append(cost)
    

if len(res) == 0:
    print("TLE")
else:
    p = min(res)
    print(p)
Buggy code:
n,t=map(int,input().split())
ans=10000
for i in range(n):
    c,ti=map(int,input().split())
    if ti<t:
        ans=min(ans,c)
print(ans if ans<10000 else "TLE")


Fixed code:
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)
    else:
        ans = ans
if ans == 10000:
    print("TLE")
else:
    print(ans)
Buggy code:
n,t=map(int,input().split())
navi=[]
for i in range(n):
  k=list(map(int,input().split()))
navi.sort()
for i in navi:
  if i[1]<=t:
    print(i[0])
    exit()
print('TLE')

Fixed code:
n,t=map(int,input().split())
navi=[]
for i in range(n):
  k=list(map(int,input().split()))
  navi.append(k)
navi.sort()
for i in navi:
  if i[1]<=t:
    print(i[0])
    exit()
print('TLE')
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)
if m==1001:
    print('TLE')

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())
ans = 1000

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

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

for _ in range(N):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)
if ans == 1001:
    print("TLE")
else:
    print(ans)
Buggy code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
from copy import deepcopy
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

n,t=MI()
costs=[]
for i in range(n):
    c,ti=MI()
    if ti<t:
        costs.append(c)
if len(costs)==0:
    print("TLE")
else:
    costs.sort()
    print(costs[0])

Fixed code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
from copy import deepcopy
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

n,t=MI()
costs=[]
for i in range(n):
    c,ti=MI()
    if ti<=t:
        costs.append(c)
if len(costs)==0:
    print("TLE")
else:
    costs.sort()
    print(costs[0])
Buggy code:
n,t=map(int,input().split())
tici=[]
for i in range(n):
	ci,ti=map(int,input().split())
	if(ti<=t):
		tici.append([ti,ci])
if(len(tici)==0):
	print('TLE')
else:
	tici.sort()
	print(tici[0][1])

Fixed code:
n,t=map(int,input().split())
tici=[]
for i in range(n):
	ci,ti=map(int,input().split())
	if(ti<=t):
		tici.append([ci,ti])
if(len(tici)==0):
	print('TLE')
else:
	tici.sort()
	print(tici[0][0])
Buggy code:
N, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(N)]
ret = 10 ** 9
for c, t in ct:
	if t <= T:
		ret = min(ret, c)
print(ret)

Fixed code:
N, T = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(N)]
ret = 10 ** 9
for c, t in ct:
	if t <= T:
		ret = min(ret, c)
if ret < 10 ** 9:
	print(ret)
else:
	print("TLE")
Buggy code:
T, N = list(map(int,input().split()))

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

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

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

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

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

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

print('TLE' if ans==1003 else ans)


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

print('TLE' if ans == 1003 else ans)
Buggy code:
n,t = map(int, input().split())
li =[]
for i in range(n):
    li.append(list(map(int, input().split())))
print(li)

a =[]
for i in range(n):
    if li[i][1] <= t:
        a.append(i)
print(a)
b = []
for i in a:
    b.append(li[i][0])
print(b)
if b:
    print(min(b))
else:
    print("TLE")


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

a =[]
for i in range(n):
    if li[i][1] <= t:
        a.append(i)
#print(a)
b = []
for i in a:
    b.append(li[i][0])
#print(b)
if b:
    print(min(b))
else:
    print("TLE")
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(c,t)
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:
num,limit=input().strip().split(' ')


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


Fixed code:
num,limit=input().strip().split(' ')


costs=[]
for i in range(int(num)):
    cost, time = input().strip().split(' ')
    if (int(time) > int(limit)):
        continue
    else:
        costs.append(int(cost))
if costs:
    print(min(costs))
else:
    print('TLE')
Buggy code:
def main():
    N, T = map(int, input().split())
    C = []
    for _ in range(N):
        c, t = map(int, input().split())
        if t <= T:
            C.append(c)
    if len(C) == 0:
        print("LTE")
    else:
        print(min(C))


if __name__ == '__main__':
    main()


Fixed code:
def main():
    N, T = map(int, input().split())
    C = []
    for _ in range(N):
        c, t = map(int, input().split())
        if t <= T:
            C.append(c)
    if len(C) == 0:
        print("TLE")
    else:
        print(min(C))


if __name__ == '__main__':
    main()
Buggy 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)

Fixed 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)
Buggy code:
l = []
N, T = map(int, input().split())
for i in range(N):
    c, t = map(int, input().split())
    if T > t:
        l.append(c)
print(min(l)if len(l) >= 1 else 'TLE')

Fixed code:
l = []
N, T = map(int, input().split())
for i in range(N):
    c, t = map(int, input().split())
    if T >= t:
        l.append(c)
print(min(l)if len(l) >= 1 else 'TLE')
Buggy code:
num, time_lim = list(map(int, input().spli()))
ans = 'TLE'
for i in range(num):
  cost, time_data = list(map(int, input().spli()))
  if time_data > time_lim:
    continue
  if ans == 'TLE':
    ans = cost
  if ans > cost:
    ans = cost
print(ans)

Fixed code:
num, time_lim = list(map(int, input().split()))
ans = 'TLE'
for i in range(num):
  cost, time_data = list(map(int, input().split()))
  if time_data > time_lim:
    continue
  if ans == 'TLE':
    ans = cost
  if ans > cost:
    ans = cost
print(ans)
Buggy code:
n,t=map(int,input().split())
result=1001
for i in range(n):
    ci,ti=map(int,input().split())
    if ti > t:
        pass
    else:
        result=min(result,ci)
if result==t+1:
    print('TLE')
else:
    print(result)


Fixed code:
n,t=map(int,input().split())
result=1001
for i in range(n):
    ci,ti=map(int,input().split())
    if ti > t:
        pass
    else:
        result=min(result,ci)
if result==1001:
    print('TLE')
else:
    print(result)
Buggy code:
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)


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

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

if min_cost == 2000:
    print("TLE")
else:
    print(min_cost)
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())

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

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

Fixed code:
N,T=map(int,input().split())
ans=float("inf")
for i in range(N):
  c,t=map(int,input().split())
  if t<=T:ans=min(ans,c)
if ans==float("inf"):
  print("TLE")
else:
  print(ans)
Buggy code:
nt=[int(x) for x in input().split()]
mini=10000000
try:
    for y in range(nt[0]):
        temp=([int(z) for z in input().split()])
        if(temp[1]<=nt[1] and temp[0]<mini):
            mini=temp[0]
    print(mini)
except:
    print("TLE")


Fixed code:
nt=[int(x) for x in input().split()]
mini=1001
try:
    for y in range(nt[0]):
        temp=([int(z) for z in input().split()])
        if(temp[1]<=nt[1] and temp[0]<mini):
            mini=temp[0]
            ans=mini
    print(ans)
except:
    print("TLE")
Buggy code:
# -*- coding: utf-8 -*-
n,t = map(int,input().split())
ans_cost = float('inf')
ans_time = t

for i in range(n):
    a,b = map(int,input().split())
    if b=ans_time:
        if a<ans_cost:
            ans_cost = a


if ans_cost == float('inf'):
    print("TLE")
else:
     print(ans_cost)

Fixed code:
# -*- coding: utf-8 -*-
n,t = map(int,input().split())
ans_cost = 10000
ans_time = t

for i in range(n):
    a,b = map(int,input().split())
    if b<=ans_time:
        if a<ans_cost:
            ans_cost = a


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

Fixed code:
n, t = map(int, input().split())
c = 10000
for i in range(n):
    tmp = input().split()
    if t >= int(tmp[1]):
        if int(tmp[0]) < c:
            c = int(tmp[0])
if c == 10000:
    print('TLE')
    exit()
else:
    print(c)
Buggy code:
N, T = [int(num) for num in input().split()]
d = {}
for _ in range(N):
    c, t = [int(num) for num in input().split()]
    d[c] = t

c = None
for cost, minutes in d.items():
    if minutes <= T:
        if c == None:
            c = cost
            continue
        if c > cost:
            c = cost

if c == T:
    print('TLE')
else:
    print(c)


Fixed code:
N, T = [int(num) for num in input().split()]
d = {}
for _ in range(N):
    c, t = [int(num) for num in input().split()]
    d[c] = t

c = None
for cost, minutes in d.items():
    if minutes <= T:
        if c is None:
            c = cost
            continue

        if c > cost:
            c = cost

if c is None:
    print('TLE')
else:
    print(c)
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(m)
    else:
        print('TLE')


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)
if m==1001:
    print('TLE')
else:
    print(m)