ZhenlongDai/ACPR huggingface dataset:
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
N, T = [int(x) for x in stdin.readline().rstrip().split()]
d = N+1
for i in range(N):
  l = list(map(int, input().split()))
  if l[1] <= T:
    if l[0] < d:
      d = l[0]
if d < N+1:
  print(d)
else:
  print('TLE')

Failing test case input:
3 70
7 94
2 80
7 50

Expected output:
7


Actual output:
TLE


Fixed submission (verdict: Accepted):
from sys import stdin
N, T = [int(x) for x in stdin.readline().rstrip().split()]
d = 1001
for i in range(N):
  l = list(map(int, input().split()))
  if l[1] <= T:
    if l[0] < d:
      d = l[0]
if d < 1001:
  print(d)
else:
  print('TLE')

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
-5 -8
0 0100
1 1
4 0100
6 31

Expected output:
TLE


Actual output:

Fixed submission (verdict: Accepted):
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')

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,T = [int(i) for i in input().split()]
ans = 1000
for _ in range(n):
    c, t = [int(i) for i in input().split()]
    if ans > c and t < T:
        ans = c
print(ans)


Failing test case input:
-5 -4
0 0100
0 1
2 0101
3 31

Expected output:
TLE


Actual output:
1000


Fixed submission (verdict: Accepted):
n,T = [int(i) for i in input().split()]
ans = 10000
for _ in range(n):
    c, t = [int(i) for i in input().split()]
    if t <= T:
        ans = min(c,ans)
if ans == 10000:
    print('TLE')
else:
    print(ans)

Problem: p03239
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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")


Failing test case input:
5 9
25 8
5 9
4 10
0000 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
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")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,c=map(int,input().split())
cost=c+1
for _ in range(n):
  a,b=map(int,input().split())
  if b<=c:cost=a
print("TLE" if cost>c else cost)

Failing test case input:
3 36
7 94
3 2
7 20

Expected output:
3


Actual output:
7


Fixed submission (verdict: Accepted):
n,t=map(int,input().split())

r=2000

for _ in range(n):
  a,b=map(int,input().split())
  if b<=t and a<r:
    r=a
if r==2000:
  print("TLE")
else:
  print(r)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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) if len(cost) > 0 else 'TLE')


Failing test case input:
5 9
3 8
5 9
4 10
0100 1000
6 1

Expected output:
3


Actual output:
6


Fixed submission (verdict: Accepted):
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(min(cost) if len(cost) > 0 else 'TLE')

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,t = map(int,input().split())
out = 1001
o = t+1
outnum = 1001
for i in range(n):
  c, tim = map(int,input().split())
  if tim < t and c < out:
    out = c
    outnum = i
if outnum == 1001:
  print('TLE')
else:
  print(outnum)

Failing test case input:
2 1
0 0110
0 1
-1 0011
0 -2

Expected output:
0


Actual output:
TLE


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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = list(map(int, input().strip().split(' ')))
b = n[1]
h = 100000
c = 100000
int(c)
a = []
for i in range(n[0]):
  a.append(list(map(int, input().split())))
  if a[i][1] <= n[1] and a[i][0] <= c:
    h = a[i][1]
    c = a[i][0]
    

print(h)
print(c)
if h < n[1]:
  print(c)
else:
    print("TLE")

Failing test case input:
-5 0
0 0101
1 1
4 1101
6 28

Expected output:
TLE


Actual output:
100000
100000
TLE


Fixed submission (verdict: Accepted):
n = list(map(int, input().strip().split(' ')))
b = n[1]
h = 100000
c = 100000
int(c)
a = []
for i in range(n[0]):
  a.append(list(map(int, input().split())))
  if a[i][1] <= n[1] and a[i][0] <= c:
    h = a[i][1]
    c = a[i][0]
    

if h <= n[1]:
  print(c)
else:
    print("TLE")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n,t = map(int,input().split())
ans_no = 0
ans_cost = t

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

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


Failing test case input:
2 1
0 0110
0 1
-1 0011
0 -2

Expected output:
0


Actual output:
TLE


Fixed submission (verdict: Accepted):

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)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())

cost = 1001

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

print(cost)

Failing test case input:
-2 -2
0 0100
0 0
2 0001
3 12

Expected output:
TLE


Actual output:
1001


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())

cost = 1001

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

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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
-2 -2
0 0001
1 0
2 0001
2 14

Expected output:
TLE


Actual output:
1001


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



params = input()

n = int(params.split(' ')[0])
t = int(params.split(' ')[1])

data = []

for i in range(0, n) :
    d = input()
    data.append([int(d.split(' ')[0]),int(d.split(' ')[1])])
    
minimum_cost = 1000000
    
for cost in data :
    if cost[1] <= t : 
        
        if cost[0] < minimum_cost :
            print (cost)
            minimum_cost = cost[0]

if minimum_cost == 1000000:
    print ("TLE")
else :
    print (minimum_cost)

Failing test case input:
2 3
1 1000
2 1
3 1010
4 500

Expected output:
2


Actual output:
[2, 1]
2


Fixed submission (verdict: Accepted):



params = input()

n = int(params.split(' ')[0])
t = int(params.split(' ')[1])

data = []

for i in range(0, n) :
    d = input()
    data.append([int(d.split(' ')[0]),int(d.split(' ')[1])])
    
minimum_cost = 1000000
    
for cost in data :
    if cost[1] <= t : 
        
        if cost[0] < minimum_cost :
            minimum_cost = cost[0]

if minimum_cost == 1000000:
    print ("TLE")
else :
    print (minimum_cost)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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, t)
  else:
    continue

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

Failing test case input:
3 70
7 94
1 80
4 50

Expected output:
4


Actual output:
50


Fixed submission (verdict: Accepted):
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)
  else:
    continue

if cost == 1001:
  print("TLE")
else:
  print(cost)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T = map(int,input().split())

C = []

for _ in range(N):
  c,t = map(int,input().split())
  if t < T:
    L = [c,t]
    C.append(L)
    
C = sorted(C,key = lambda x:x[1])

if len(C) == 0:
  print("TLE")
else:print(C[0][0])

Failing test case input:
5 9
25 8
5 9
4 10
1000 1000
6 1

Expected output:
5

Actual output:
6


Fixed submission (verdict: Accepted):
N,T = map(int,input().split())

C = []

for _ in range(N):
  c,t = map(int,input().split())
  if t <= T:
    L = [c,t]
    C.append(L)
    
C = sorted(C,key = lambda x:x[0])

if len(C) == 0:
  print("TLE")
else:print(C[0][0])

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
4 3
1 1000
2 4
3 1010
4 500

Expected output:
TLE


Actual output:
1001


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num, time = map(int, input().split(' '))


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




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)


Failing test case input:
2 1
0 0110
0 1
-1 0011
0 -2

Expected output:
0


Actual output:
TLE


Fixed submission (verdict: Accepted):
num, time = map(int, input().split(' '))


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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())
CT = [tuple(map(int, input().split())) for _ in range(N)]

ans = 1010
for c, t in CT:
    if t > T:
        continue
    ans = min(ans, c)
print(ans if ans <= T else 'TLE')

Failing test case input:
4 0
0 0100
-1 6
1 1010
6 -1

Expected output:
6


Actual output:
TLE


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())
CT = list(tuple(map(int, input().split())) for _ in range(N))

ans = 1001
for c, t in CT:
    if t <= T:
        ans = min(ans, c)
print(ans if ans < 1001 else 'TLE')
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,t = map(int, input().split())
minc = 10**8
for i in range(n):
    c, ti = map(int, input().split())
    if ti >= t: continue
    if c < minc: minc = c
print(minc if minc <= 10**3 else "TLE")

Failing test case input:
5 9
25 8
5 9
4 10
0000 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
n,t = map(int, input().split())
minc = 10**8
for i in range(n):
    c, ti = map(int, input().split())
    if ti > t: continue
    if c < minc: minc = c
print(minc if minc <= 10**3 else "TLE")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

from operator import itemgetter


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

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

time_flag = 0
for i in range(len(ct)):
    if ct[i][1] < t:
        time_flag += 1
    else:
        ct[i][0] = 1001

ct0=list(ct)
ct.sort(key=itemgetter(0))


if time_flag == 0:
    print("TLE")
else:
    for i in range(len(ct0)):
        if ct[0] == ct0[i]:
            print(int(i)+1)

Failing test case input:
4 0
-1 0111
-4 0
2 1011
1 0

Expected output:
-4


Actual output:
TLE


Fixed submission (verdict: Accepted):

from operator import itemgetter


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

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

time_flag = 0
for i in range(len(ct)):
    if ct[i][1] <= t:
        time_flag += 1
    else:
        ct[i][0] = 1001

ct0=list(ct)
ct.sort(key=itemgetter(0))


if time_flag == 0:
    print("TLE")
else:
    print(ct[0][0])

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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)

Failing test case input:
1 0
0 0101
1 0
2 0001
1 14

Expected output:
TLE


Actual output:
0


Fixed submission (verdict: Accepted):

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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T = map(int, input().split())

min_t = T + 1
ans = 10000

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

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

Failing test case input:
4 3
1 1000
2 4
3 1000
4 500

Expected output:
TLE

Actual output:
2


Fixed submission (verdict: Accepted):
N,T = map(int, input().split())

ans = 10000

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

if ans!=10000:
  print(ans)
else:
  print("TLE")
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T=map(int,input().split())
mini = 100000000000
for i in range(N):
    c,t=map(int,input().split())
    if t<=T:
        mini = min(mini,c)
print(mini)

Failing test case input:
-2 -2
0 0001
1 0
2 0001
1 14

Expected output:
TLE


Actual output:
100000000000


Fixed submission (verdict: Accepted):
N,T=map(int,input().split())
mini = 1145141919810
for i in range(N):
    c,t=map(int,input().split())
    if t<=T:
        mini = min(mini,c)
if mini == 1145141919810:
    mini = "TLE"
print(mini)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,c=map(int,input().split())
cost=c+1
for _ in range(n):
  a,b=map(int,input().split())
  if b<=c:cost=min(cost,a)
print("TLE" if cost>c else cost)

Failing test case input:
4 0
0 0100
-1 6
1 1010
6 -1

Expected output:
6


Actual output:
TLE


Fixed submission (verdict: Accepted):
n,t=map(int,input().split())

r=2000

for _ in range(n):
  a,b=map(int,input().split())
  if b<=t and a<r:
    r=a
if r==2000:
  print("TLE")
else:
  print(r)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, T = map(int, input().split())
out = 1001
for i in range(n):
  c, t = map(int, input().split())
  if t <= T:
    out = min(out, c)
    
if out == 1001:
  print("LTE")
else:
  print(out)

Failing test case input:
4 3
1 1000
2 4
3 1000
4 500

Expected output:
TLE

Actual output:
LTE


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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
3 36
7 94
1 2
7 20

Expected output:
1


Actual output:
7


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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())
    
ans = 1001
for i in range(N):
    if t[i] < T:
        if c[i] < ans:
            ans = c[i]
            
if ans == 1001:
    print('TLE')
else:
    print(ans)

Failing test case input:
4 0
-1 0111
-4 0
2 1011
1 0

Expected output:
-4


Actual output:
TLE


Fixed submission (verdict: Accepted):
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())
    
ans = 1001
for i in range(N):
    if t[i] <= T:
        if c[i] < ans:
            ans = c[i]
            
if ans == 1001:
    print('TLE')
else:
    print(ans)
Problem: p03239
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, T = map(int, input().split())
ans = []
for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    ans.append(c)
if len(ans) > 0:
  print(max(ans))
else:
  print("TLE")

Failing test case input:
5 9
25 8
5 9
4 10
0100 1000
6 1

Expected output:
5


Actual output:
25


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())
ans = []
for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    ans.append(c)
if len(ans) > 0:
  print(min(ans))
else:
  print("TLE")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = list(map(int, input().split()))
N = li[0]
L = li[1]
m = li[1]
idx=0
for i in range(N):
    li = list(map(int, input().split()))
    if li[1] < m:
        m=li[1]
        idx=li[0]

if m != L:
    print(idx)
else:
    print('TLE')

Failing test case input:
4 0
-1 0111
-4 0
2 1011
1 0

Expected output:
-4


Actual output:
TLE


Fixed submission (verdict: Accepted):
li = list(map(int, input().split()))
N = li[0]
L = li[1]
m = 10001
idx = 0
flag=0
for i in range(N):
    li = list(map(int, input().split()))
    if li[1] <= L and li[0]<m:
        m=li[0]
        idx = i
        flag=1

if flag:
    print(m)
else:
    print('TLE')

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

c = [int(1001)]

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

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

Failing test case input:
5 9
25 8
5 9
4 10
0100 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):

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

c = [int(1001)]

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

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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)
    

Failing test case input:
2 3
0 1100
1 1
2 0011
4 156

Expected output:
1


Actual output:
TLE


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
3 91
7 94
2 80
7 50

Expected output:
2


Actual output:
50


Fixed submission (verdict: Accepted):
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)
Problem: p03239
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,T=map(int,input().split())
a=T+1
for i in range(N):
    c,t=map(int,input().split())
    if t<=T and c<a:a=c
print(a if a!=T+1 else 'TLE')

Failing test case input:
4 0
0 0100
-1 6
1 1010
6 -1

Expected output:
6


Actual output:
TLE


Fixed submission (verdict: Accepted):
N,T=map(int,input().split())
a=10000
for i in range(N):
    c,t=map(int,input().split())
    if t<=T and c<a:a=c
print(a if a!=10000 else 'TLE')

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

c = [int(1001)]

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

tmp = min(c)

if tmp == 1001:
    print("TEL")
else:
    print(tmp)

Failing test case input:
-5 0
0 0001
1 1
4 1111
6 36

Expected output:
TLE


Actual output:
TEL


Fixed submission (verdict: Accepted):

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

c = [int(1001)]

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

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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,t = map(int,input().split())
s = [list(map(int,input().split())) for i in range(n)]
Min = 1000
for i in range(n):
    if s[i][1] <= t:
        Min = min(Min,s[i][0])
print(Min)

Failing test case input:
-4 -4
0 0100
1 0
2 0001
3 31

Expected output:
TLE


Actual output:
1000


Fixed submission (verdict: Accepted):
n,t = map(int,input().split())
s = [list(map(int,input().split())) for i in range(n)]
Min = 1001
for i in range(n):
    if s[i][1] <= t:
        Min = min(Min,s[i][0])
if Min == 1001:
	print("TLE")
else:
	print(Min)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())
minc = 1001
for _ in range(N):
  c, t = map(int, input().split())
  if t < T and c < minc:
    minc = c

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

Failing test case input:
5 9
25 8
5 9
4 10
1000 1000
6 1

Expected output:
5

Actual output:
6


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())
minc = 1001
for _ in range(N):
  c, t = map(int, input().split())
  if t <= T and c < minc:
    minc = c

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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T = list(map(int, input().split()))
max = 0
for i in range(N):
    c,t = list(map(int, input().split()))
    if t <= T and c > max:
        max = c
print(max)

Failing test case input:
3 36
7 94
2 2
7 20

Expected output:
2


Actual output:
7


Fixed submission (verdict: Accepted):
N,T = list(map(int, input().split()))
max = 10000
for i in range(N):
    c,t = list(map(int, input().split()))
    if t <= T and c <= max:
        max = c
if max == 10000:
    print("TLE")
else:
    print(max)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))

Failing test case input:
5 9
25 8
5 9
4 10
0000 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
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))

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve():
    n,t = map(int,input().split())
    mn = 10**9
    for _ in range(n):
        a,b = map(int,input().split())
        if b<=t:
            mn = min(mn,a)
    if mn<=t:
        print(mn)
    else:
        print('TLE')
if __name__=='__main__':
    solve()

Failing test case input:
4 0
0 0100
-1 6
1 1010
6 -1

Expected output:
6


Actual output:
TLE


Fixed submission (verdict: Accepted):
def solve():
    n,t = map(int,input().split())
    mn = 10**9
    ans = False
    for _ in range(n):
        a,b = map(int,input().split())
        if b<=t:
            mn = min(mn,a)
            ans = True
    if ans:
        print(mn)
    else:
        print('TLE')
if __name__=='__main__':
    solve()

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())
List = []
List2 = []
min = 1000

for i in range(N):
    M, B = map(int, input().split())
    List.append([M,B])
    M, B = 0, 0

for k in range(N):
    if int(List[k][1]) <= T:
        List2.append(List[k])

for n in range(len(List2)):
    if List2[n][0] <= min:
        min = List[n][0]

print(min)

Failing test case input:
-5 0
-1 0100
1 1
4 1100
6 45

Expected output:
TLE


Actual output:
1000


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())
List = []
List2 = []
min = 1001

for i in range(N):
    M, B = map(int, input().split())
    List.append([M,B])
    M, B = 0, 0

for k in range(N):
    if int(List[k][1]) <= T:
        List2.append(List[k])

for n in range(len(List2)):
    if List2[n][0] <= min:
        min = List2[n][0]

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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T =map(int,input().split())
ans = 1000
for i in range(0,N):
    c,t=map(int,input().split())
    if t <=T:
        ans =min(ans,c)
    i +=1
print(ans)


Failing test case input:
-5 -4
0 0100
1 1
2 0001
3 31

Expected output:
TLE


Actual output:
1000


Fixed submission (verdict: Accepted):
N,T =map(int,input().split())
ans = 1001
for i in range(0,N):
    c,t=map(int,input().split())
    if t <=T:
        ans =min(ans,c)
    i +=1
if ans ==1001:
    print("TLE")
else:
    print(ans)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())
ans = T + 1
for i in range(N):
  c, t = map(int, input().split())
  if t <= T and c < ans:
    ans = c
if ans == T + 1:
  print("TLE")
else:
  print(ans)

Failing test case input:
4 0
0 0100
-1 6
1 1010
6 -1

Expected output:
6


Actual output:
TLE


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)



Failing test case input:
5 9
25 8
5 9
4 10
0100 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())
data = [list(map(int, input().split())) for _ in [0]*N]
data.sort(key=lambda x: x[0])
data = [d for d in data if d[1] <= T]
print(data[0][0] if len(data) > 1 else 'TLE')

Failing test case input:
3 70
7 94
2 80
4 50

Expected output:
4


Actual output:
TLE


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())
data = [list(map(int, input().split())) for _ in [0]*N]
data.sort(key=lambda x: x[0])
data = [d for d in data if d[1] <= T]
print(data[0][0] if len(data) >= 1 else 'TLE')

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(cost if cost<1001 else "TLE")

Failing test case input:
4 0
-1 0111
-4 0
2 1011
1 0

Expected output:
-4


Actual output:
TLE


Fixed submission (verdict: Accepted):
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(cost if cost<1001 else "TLE")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=[]
b=1000
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 !=1000:
    print(b)
else:
    print("TLE")

Failing test case input:
2 1
0 0110
0 1
-1 0011
0 -2

Expected output:
0


Actual output:
TLE


Fixed submission (verdict: Accepted):
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")
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

cost_min = 100000

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

if cost_min == -1:
    print("TLE")
else:
    print(cost_min)

Failing test case input:
-5 0
0 0001
1 1
4 1111
6 28

Expected output:
TLE


Actual output:
100000


Fixed submission (verdict: Accepted):


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

cost_min = 100000

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

if cost_min == 100000:
    print("TLE")
else:
    print(cost_min)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(ans)


Failing test case input:
-4 -2
0 0101
1 0
2 0001
3 31

Expected output:
TLE


Actual output:
1005


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())
c=[]
t=[]
for i in range(N):
    tmp=input().split()
    c.append(int(tmp[0]))
    t.append(int(tmp[1]))

ans=10**51
for k in range(N):
    if t[k]<= T:
        ans = min(ans, c[k])
        
print(ans)

Failing test case input:
2 0
0 0100
1 1
2 0011
4 156

Expected output:
TLE


Actual output:
1000000000000000000000000000000000000000000000000000


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())
c=[]
t=[]
for i in range(N):
    tmp=input().split()
    c.append(int(tmp[0]))
    t.append(int(tmp[1]))

INF=2**51+1
ans=INF
for k in range(N):
    if t[k]<= T:
        ans = min(ans, c[k])
        
if ans==INF:
    print("TLE")
else:
    print(ans)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
3 91
7 94
2 80
7 50

Expected output:
2


Actual output:
7


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,T=map(int,input().split())
ans=10**9
for _ in range(n):
  c,t=map(int,input().split())
  if t<=T:
    ans=min(ans, c)
print(ans)

Failing test case input:
-5 -8
0 0100
1 1
2 0101
3 31

Expected output:
TLE


Actual output:
1000000000


Fixed submission (verdict: Accepted):
n,T=map(int,input().split())
ans=10**9
isOk=False
for _ in range(n):
  c,t=map(int,input().split())
  if t<=T:
    ans=min(ans, c)
    isOk=True
print(ans) if isOk else print("TLE")
Problem: p03239
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,T=map(int,input().split())
cost=1000
for _ in range(N):
    c,t=map(int,input().split())
    if t<=T:
        if cost>=c:
            cost=c
if cost<=1000:
    print(cost)
else:print("TLE")

Failing test case input:
-5 -8
0 0100
2 1
4 0100
6 31

Expected output:
TLE


Actual output:
1000


Fixed submission (verdict: Accepted):
N,T=map(int,input().split())
cost=1001
for _ in range(N):
    c,t=map(int,input().split())
    if t<=T:
        cost=min(c,cost)
if cost<=1000:
    print(cost)
else:print("TLE")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
4 0
-1 0111
-4 0
2 1011
1 0

Expected output:
-4


Actual output:
TLE


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())

cost_val = 'TLE'
min_time = 10000000

for i in range(N):
  cost, time = map(int, input().split())
  if time < T and time < min_time:
    cost_val, min_time = cost, time
    
print(cost_val)


Failing test case input:
5 9
3 8
5 9
4 10
0100 1000
6 0

Expected output:
3


Actual output:
6


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())

min_cost = 100000000

for i in range(N):
  cost, time = map(int, input().split())
  if time <= T and cost < min_cost:
    min_cost = cost
    
if min_cost is 100000000:
  print('TLE')
else:
  print(min_cost)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N , T  = map(int,input().split())
tmp_a = 1000
result = 0
count = 1
while count < N+1:
 a,b = map(int,input().split())
 if b < T and a < tmp_a:
  result = count
  tmp_a = a
 count = count + 1
if result == 0:
 print('TLE')
else:
 print(result)

Failing test case input:
2 1
0 0110
0 1
-1 0011
0 -2

Expected output:
0


Actual output:
TLE


Fixed submission (verdict: Accepted):
N , T  = map(int,input().split())
result = 1001
while N > 0:
 a,b = map(int,input().split())
 if b <= T and a < result:
  result = a
 N = N - 1
if result == 1001:
 print('TLE')
else:
 print(result)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = [int(elem) for elem in input().split()]
min_cost = None
min_cost_time = None
for i in range(0, N):
  c, t = [int(elem) for elem in input().split()]
  if t < T:
    if min_cost is None:
      min_cost = c
      min_cost_time = t
    else:
      if c < min_cost:
        min_cost = c
        min_cost_time = t
if min_cost is None:
  print('TLE')
else:
  print(min_cost)

Failing test case input:
5 9
25 8
5 9
4 10
1000 1000
6 1

Expected output:
5

Actual output:
6


Fixed submission (verdict: Accepted):
N, T = [int(elem) for elem in input().split()]
min_cost = None
min_cost_time = None
for i in range(0, N):
  c, t = [int(elem) for elem in input().split()]
  if t <= T:
    if min_cost is None:
      min_cost = c
      min_cost_time = t
    else:
      if c < min_cost:
        min_cost = c
        min_cost_time = t
if min_cost is None:
  print('TLE')
else:
  print(min_cost)

Problem: p03239
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
-1 -2
0 0001
1 0
2 0001
1 14

Expected output:
TLE


Actual output:
inf


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
2 3
1 1000
2 1
3 1010
4 500

Expected output:
2


Actual output:
TLE


Fixed submission (verdict: Accepted):
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")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, T = map(int, input().split())
M = 10000
for n in range(N):
    c, t = map(int, input().split())
    if T >= t:
        M = min(M, c)
print(M)


Failing test case input:
-5 -8
-1 0100
1 1
4 1100
6 45

Expected output:
TLE


Actual output:
10000


Fixed submission (verdict: Accepted):
N, T = map(int, input().split())
M = 10000
for n in range(N):
    c, t = map(int, input().split())
    if T >= t:
        M = min(M, c)
if M == 10000:
    print("TLE")
else:
    print(M)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T=map(int,input().split())
t_dic={}
cnt=0
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        t_dic[t]=c
        cnt+=1
if cnt == 0:
    print('TLE')
else:
    print(min(t_dic.values()))

Failing test case input:
4 0
-1 0111
-4 0
2 1011
1 0

Expected output:
-4


Actual output:
1


Fixed submission (verdict: Accepted):
N,T=map(int,input().split())
c_list=[]
cnt=0
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        c_list.append(c)
        cnt+=1
if cnt == 0:
    print('TLE')
else:
    print(min(c_list))

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])

Failing test case input:
5 9
25 8
5 9
4 10
0100 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
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:
    
    
    print(min(cost))

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)
 

Failing test case input:
4 0
-1 0111
-4 0
2 1011
1 0

Expected output:
-4


Actual output:
TLE


Fixed submission (verdict: Accepted):
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)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(c)

Failing test case input:
5 9
25 8
5 9
4 10
0000 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
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)
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
N, T = [int(x) for x in stdin.readline().rstrip().split()]
d = 1001
for i in range(N):
  l = list(map(int, input().split()))
  if l[1] <= T:
    if l[0] < d:
      d = l[0]
if d < N+1:
  print(d)
else:
  print('TLE')

Failing test case input:
3 70
7 94
0 80
9 50

Expected output:
9


Actual output:
TLE


Fixed submission (verdict: Accepted):
from sys import stdin
N, T = [int(x) for x in stdin.readline().rstrip().split()]
d = 1001
for i in range(N):
  l = list(map(int, input().split()))
  if l[1] <= T:
    if l[0] < d:
      d = l[0]
if d < 1001:
  print(d)
else:
  print('TLE')

Problem: p03239
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, t = map(int, input().split())
_list = [input() for i in range(n)]
costs, times = [], []
for elem in _list:
    print(elem)
    cost, time = map(int, elem.split())
    costs.append(cost)
    times.append(time)

min_cost = 1001  
for cost, time in zip(costs, times):
    if time <= t and cost < min_cost:
        min_cost = cost

if min_cost < 1000:
    print(min_cost)
else:
    print('TLE')

Failing test case input:
1 0
0 0101
1 0
2 0001
2 14

Expected output:
TLE


Actual output:
0 0101
TLE


Fixed submission (verdict: Accepted):
n, t = map(int, input().split())
_list = [input() for i in range(n)]
costs, times = [], []
for elem in _list:
    
    cost, time = map(int, elem.split())
    costs.append(cost)
    times.append(time)

min_cost = 1001  
for cost, time in zip(costs, times):
    if time <= t and cost < min_cost:
        min_cost = cost  

if min_cost <= 1000:
    print(min_cost)
else:
    print('TLE')

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T = list(map(int, input().split()))
max = 0
for i in range(N):
    c,t = list(map(int, input().split()))
    if t <= T and c > max:
        max = c
if max == 0:
    print("TLE")
else:
    print(max)

Failing test case input:
5 9
25 8
5 9
4 10
0000 1000
6 1

Expected output:
5


Actual output:
25


Fixed submission (verdict: Accepted):
N,T = list(map(int, input().split()))
max = 10000
for i in range(N):
    c,t = list(map(int, input().split()))
    if t <= T and c <= max:
        max = c
if max == 10000:
    print("TLE")
else:
    print(max)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, t = map(int, input().split())

measure = 65536
ans = 0

for i in range(n):
  cost, time = map(int, input().split())
  if time < measure:
    measure = time
    ans = cost

if not measure < t:
  ans = 'TLE'
print(ans)

Failing test case input:
5 9
25 8
5 9
4 10
1000 1000
6 1

Expected output:
5

Actual output:
6


Fixed submission (verdict: Accepted):
n, t = map(int, input().split())


choice = []

for i in range(n):
  cost, time = map(int, input().split())
  if time > t:
    pass
  else:
    choice.append(cost)
if len(choice) == 0:
  print('TLE')
else:
  print(min(choice))
Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

Failing test case input:
5 9
25 8
5 9
4 10
1000 1000
6 1

Expected output:
5

Actual output:
6


Fixed submission (verdict: Accepted):

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

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

cost_min = 100000

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

print(cost_min)


Failing test case input:
-2 -2
0 0001
1 0
2 0001
1 14

Expected output:
TLE


Actual output:
100000


Fixed submission (verdict: Accepted):


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

cost_min = 100000

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

if cost_min == 100000:
    print("TLE")
else:
    print(cost_min)

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, t = map(int, input().split())

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

min = 1001
for x, y in a:
  if x < min and y < t:
    min = x

print(min if min < 1001 else "TLE")

Failing test case input:
5 9
25 8
5 9
4 10
0100 1000
6 1

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
n, t = map(int, input().split())

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

min = 1001
for x, y in a:
  if x < min and y <= t:
    min = x

print(min if min < 1001 else "TLE")

Problem: p03239
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,T = map(int,input().split())
cmin = 10**4
for _ in range(N):
    c,t = map(int,input().split())
    if t<=T:
        cmin = min(cmin,c)
print(cmin)

Failing test case input:
-2 -1
0 0101
1 -1
2 0001
3 12

Expected output:
TLE


Actual output:
10000


Fixed submission (verdict: Accepted):
N,T = map(int,input().split())
cmin = 10**4
for _ in range(N):
    c,t = map(int,input().split())
    if t<=T:
        cmin = min(cmin,c)
if cmin>10**3:
    print("TLE")
else:
    print(cmin)