TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education.   One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B.   Takahashi, who is taking this exam, suddenly forgets his age.   He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2.   Write this program for him.

Submission attempts (in order):
N=int(input())
if N == 1:
    print("hello world")
else:
    A = int(input())
    B = int(input())
    print(A+B)

N=int(input())
if N == 1:
    print("hello world")
elif N == 2:
    A = int(input())
    B = int(input())
    print(A+B)

N=int(input())
if N == 1:
    print("hello world")
else:
    A = float(input())
    B = float(input())
    print(A+B)

N=int(input())
if N == 1:
    print("Hello World")
elif N == 2:
    A = int(input())
    B = int(input())
    print(A+B)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education.   One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B.   Takahashi, who is taking this exam, suddenly forgets his age.   He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2.   Write this program for him.

Submission attempts (in order):
n = int(input())
a = int(input())
b = int(input())

if n ==1:
    print('Hello World')
if n == 2:
    print(a+b)

n = int(input())


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

Verdicts: Runtime Error

Accepted
Problem: In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education.   One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B.   Takahashi, who is taking this exam, suddenly forgets his age.   He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2.   Write this program for him.

Submission attempts (in order):
N = int(input())
if N == 1:
    print("Hello Wolrd")
else:
    print(int(input())+int(input()))

N = int(input())
if N == 1:
    print("Hello World")
else:
    print(int(input())+int(input()))

Verdicts: Wrong Answer

Accepted
Problem: In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education.   One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B.   Takahashi, who is taking this exam, suddenly forgets his age.   He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2.   Write this program for him.

Submission attempts (in order):
n=int(input())
a=int(input())
b=int(input())
if n==1:
  print("Hello World")
else:
  print(a+b)

n=int(input())
if n==1:
  print("Hello World")
else:
  print(int(input())+int(input()))
  

Verdicts: Runtime Error

Accepted
Problem: In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education.   One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B.   Takahashi, who is taking this exam, suddenly forgets his age.   He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2.   Write this program for him.

Submission attempts (in order):
N = input()

if N == 1:
    print("Hello World")
else:
    A, B = map(int, input().split())
    print(A + B)


N = int(input())

if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
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')

n,t=map(int,input().split())
navi=[]
for i in range(n):
  k=list(map(int,input().split()))
navi.sort()
flag=False
for i in navi:
  if i[1]<=t:
    print(i[0])
    flag=True
    break
if flag==False:
  print('TLE')

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
ct = [None] * N
for i in range(N):
  ct[i] = list(map(int, input().split()))
ct = list(filter(lambda x: x[1] <= T, ct))
if not len(ct) > 0:
  ct.append([0, 'TLE'])
ct = sorted(ct, key=lambda x: x[0])
print(ct[0][1])


N, T = map(int, input().split())
ct = [None] * N
for i in range(N):
  ct[i] = list(map(int, input().split()))
ct = sorted([x[0] for x in ct if x[1] <= T]) + ['TLE']
print(ct[0])

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n = 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")

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

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=input().split()
a=0
b=0
for i in range(int(N)):
    c,t=input().split()
    if int(t)<=int(T):
        if b==0:
            a=c
            b+=1
        if int(c)<int (a):
            a=c
            i+=1
if a==0:

A,B = (input().split())
A = int(A)
B = int(B)
roads = []
for i in range(A):
    a, b = input().split()
    a = int(a)
    if t in range(1, B + 1):
        roads.append((int(a), b))

if len(roads) == 0:
    print("TLE")
else:
    roads.sort()
    print(roads[0][0])

N , T = map(int, input().split())
cost = []
error=[]
for i in range(0 , N ):
    x = [int(x) for x in input().split()]
for i in range (len(x)):
    if x[1]<=T :
        cost.append(x[i][0])
    if x[1] > T:
        error.append(x[i][1])
if len(error) == N :
    print("TLE")
else:
    print(min(cost))



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

c = []

for i in range(0,n):
    c_i, t_i = map(int, input().split())

    if t_i <= t:
        c.append(c_i)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

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

min_aaa =1001

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

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




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

min_aaa =1001

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

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




Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = [int(i) for i in input()]
ans = LTE
for i in range(N):
  c1,c2 = [int(j) for j in input()]
  
  if c2 <= T:
    ans = c1
    
print(ans)

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

    if c2 <= T:
        ans = c1

print(ans)

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)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int, input().split)
routes = []
for _ in range(n):
  routes.append(tuple(map(int, input().split)))
print(min(route[0] for route in routes if route[1]<t))

n, t = map(int, input().split())
routes = []
for _ in range(n):
  routes.append(tuple(map(int, input().split())))
try:
  print(min(route[0] for route in routes if route[1]<=t))
except:
  print("TLE")

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
l=[]
for i in range(n):
    c,time=map(int,input().split())
    if time>=t:
        l.append(c)
print(min(l))

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

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=map(int,input().split())
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)

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)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n , T =f()

    minc = 10000
    for i in range(n):
        c,t = f()
        if t<= T:
            mic = min(minc, c)
    
    if minc == 10000:
        print('TLE')
    else:
        print(minc)

solve()

import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n , T =f()

    minc = 10000
    for i in range(n):
        c,t = f()
        if t<= T:
            minc = min(minc, c)
    
    if minc == 10000:
        print('TLE')
    else:
        print(minc)

solve()

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().spplit())
ct=[list(map(int,input().split())) for i in range(n)]
ans=1001
for i in range(n):
  if ct[n][1]<=t and ct[n][0]<=ans:
    ans=ct[n][0]
if ans<1001:
  print(ans)
else:
  print("TLE")

n,t=map(int,input().split())
ct=[list(map(int,input().split())) for i in range(n)]
ans=1001
for i in range(n):
  if ct[n][1]<=t and ct[n][0]<=ans:
    ans=ct[n][0]
if ans<1001:
  print(ans)
else:
  print("TLE")

n,t=map(int,input().split())
ct=[list(map(int,input().split())) for i in range(n)]
ans=1001
for i in range(n):
  if ct[i][0]<=ans and ct[i][1]<=t:
    ans=ct[i][0]
if ans<1001:
  print(ans)
else:
  print("TLE")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n = int(input())

xyh = []

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

isOk = False
i = 0
j = 0
constant = -1

for i in range(101):
    for j in range(101):

        constant = -1
        for xyhTemp in xyh:
            if xyhTemp[2] != 0:
                temp = xyhTemp[2] + abs(i - xyhTemp[0]) + abs(j - xyhTemp[1])

                if constant == -1:
                    constant = temp

                if constant != temp:
                    break
        else:

            for p in xyh:
                if p[2] == 0 and constant - abs(i - p[0]) - abs(j - p[1]) > 0:
                    break
            else:
                isOk = True
                break
        
    if isOk:
        break

print(i, j, constant)
        


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

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

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

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split(' '))

List = []
 
for _ in range(N):
  list = list(map(int,input().split(' ')))
  List.append(list)
 
List = [x[0] for x in List if x[1]<=T]
  
print(min(List))

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

for _ in range(N):
  list = list(map(int,input().split(' ')))
  List.append(list)

List = [x[0] for x in List if x[1]<=T]
  
print(min(List))

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

clist = []
tlist = []

for _ in range(N):
  L = list(map(int,input().split(' ')))
  clist.append(L[0])
  tlist.append(L[1])
  
List = [c for c,t in zip(clist,tlist) if t<=T]

if len(List):
  print(min(List))
else:
  print('TLE')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
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')

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
#encoding utf-8
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])

ct0 = list(ct)
ct.sort(key=itemgetter(1))
# print(ct)
# print(ct0)
if ct[0][1] <= t:
    for i in range(len(ct0)):
        if ct[0] == ct0[i]:
            print(int(i)+1)
else:
    print("TLE")


#encoding utf-8
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))
# print(ct)

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

#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

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

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

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

if len(costs) > 0:

    costs.sort()
    print(costs[0])
else:
    print("TLE")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
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]

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

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]

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

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]

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

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)

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)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input.split())
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)

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

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split())
ans = [c for c,t in sorted([(input().split()) for i in range(N)],key=lambda x :x[1]) if int(t)<=T][-1]
if len(ans)!=0:
    print(ans)
else:
    print("TLE")

N,T = map(int,input().split())
ans = [c[-1] for c,t in sorted([(input().split()) for i in range(N)],key=lambda x :x[1]) if int(t)<=T]
if len(ans)!=0:
    print(ans)
else:
    print("TLE")

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

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
r = [tuple(map(int, input().split())) for _ in range(n)]
f = [(c, t) for c, t in r if t <= T]
print(min(f, key=lambda x: x[0]))

N, T = map(int, input().split())
r = [tuple(map(int, input().split())) for _ in range(N)]
f = [(c, t) for c, t in r if t <= T]
if len(f)==0:
  print('TLE')
else:
  print(min(f, key=lambda x: x[0])[0])


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T=map(int,input().split())
l=[]
for i in range(n):
    l.append(list(map(int,input().split())))
c=[]
t=[]
for i in range(n):
    c.append(l[i][0])
    t.append(l[i][1])

c_n=[]
t_n=[]
for i in range(n):
    if t[i]<=T:
        c_n.append(c[i])
        t_n.append(t[i])

if len(c_n)==0:
    print("TLE")
else:
    for i in range(len(c_n)):
        if t_n[i]==max(t_n):
            print(c_n[i])
            break




n,T=map(int,input().split())
l=[]
for i in range(n):
    l.append(list(map(int,input().split())))
c=[]
t=[]
for i in range(n):
    c.append(l[i][0])
    t.append(l[i][1])

c_n=[]
t_n=[]
for i in range(n):
    if t[i]<=T:
        c_n.append(c[i])
        t_n.append(t[i])

if len(c_n)==0:
    print("TLE")
else:
    for i in range(len(c_n)):
        if c_n[i]==min(c_n):
            print(c_n[i])
            break




Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int, input().strip().split())
ans = 1e9
for i in range(n):
  x, y = map(int, input().strip().split())
  if y <= t:
    x = min(x, ans)
print(ans if ans < 1e6 else 'TLE')


n, t = map(int, input().strip().split())
ans = 1e9
for i in range(n):
  x, y = map(int, input().strip().split())
  if y <= t:
    ans = min(x, ans)
print(ans if ans < 1e6 else 'TLE')

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
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))

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)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
def main():
    N,T= (int(i) for i in input().split())
    A=[]
    B=[]
    
    for i in range(N):
        ai,bi= (int(j) for j in input().split())  
        A.append(ai)
        B.append(bi)

    if (min(A)) <= T:
        print(min((A))
    else:
        print("TLE")
    
          
main()

def main():
    N,T= (int(i) for i in input().split())
    A=[]
    B=[]
    
    for i in range(N):
        ai,bi= (int(j) for j in input().split())  
        A.append(ai)
        B.append(bi)

    if (min(B)) <= T:
        print(min(A))
    else:
        print("TLE")
     
main()

def main():
    N,T= (int(i) for i in input().split())
    a_min=1001

    for i in range(N):
        ai,bi= (int(j) for j in input().split())  
        if bi<= T:
            if ai <= a_min:
                a_min = ai

    if a_min==1001:
        print("TLE")
    else:
        print(a_min)
          
     
main()

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
line = input()
X, Y = [int(n) for n in line.split()]

value = "TLE"
route_cost = []
for i in range(X):
    line = input()
    cost, time = [int(n) for n in line.split()]
    route_cost.append([cost, time, i])

route_cost.sort(key=lambda x: x[0])
for cost, time, i in route_cost:
    if time > Y:
        continue
    else:
        value = i
    print(value)

if __name__ == "__main__":
    N, T  = map(int, input().split())
    minCost = float("inf")
    answer = None
    for i in range(1,N+1):
        c,t = map(int, input().split())
        if c < minCost and t <= T:
            minCost = c
            answer = i
    if answer: 
        print(i)
    else:
        print("TLE")
    


line = input()
n, t = [int(n) for n in line.split()]
min_coust = 0
route = 0
for _ in range(n):
    line = input()
    coust, time = [int(n) for n in line.split()]
    if min_coust == 0 and time <= t:
        min_coust = coust
    elif time <= t and coust <= min_coust:
        min_coust = coust
ans = "TLE" if min_coust== 0 else min_coust
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
min_c = 10**5
for n in range(N):
    c, t = map(int, input().split())
    if t <= T:
        min_c = min(min_c, c)

if count == 1001:
    print(min_c)
else:
    print('TLE')

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

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

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

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

print(ans if ans!=10**4 else 'TLE')

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int,input().split())
mydict = {}
for i in range(n):
  a, b = map(int,input().split())
  mydict.setdefault(a, b)
sortedDict = sorted(mydict.items())
print(sortedDict)
k = 0
for j in sortedDict:
  k += 1
  if j[1] <= t:
    print(j[0])
    break
  if k == len(sortedDict):
  	print("TLE")
    break

n, t = map(int,input().split())
mydict = {}
for i in range(n):
  a, b = map(int,input().split())
  mydict.setdefault(a, b)
sortedDict = sorted(mydict.items())
k = 0
for j in sortedDict:
  k += 1
  if j[1] <= t:
    print(j[0])
    break
  if k == len(sortedDict):
  	print("TLE")
	break

n, t = map(int,input().split())
mydict = {}
for i in range(n):
	a, b = map(int,input().split())
	mydict.setdefault(a, b)
sortedDict = sorted(mydict.items())
k = 0
for j in sortedDict:
	k += 1
	if j[1] <= t:
		print(j[0])
        break
	if k == len(sortedDict):
		print("TLE")


n, t = map(int,input().split())
mydict = {}
for i in range(n):
  a, b = map(int,input().split())
  mydict.setdefault(a, b)
sortedDict = sorted(mydict.items())
k = 0
for j in sortedDict:
  k += 1
  if j[1] <= t:
    print(j[1])
    break
  if k == len(sortedDict):
  	print("TLE")



n,t = map(int, input().split())
a = []
b = 0
for i in range(n):
  l = list(map(int, input().split()))
  a.append(l)
a.sort()
for i in range(n):
  if a[i][1] <= t:
    b = a[i][0]
    break
if b > 0:
  print(b)
else:
  print("TLE")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
li = str(input).split(" ")
NT = list(map(int,li))
N = NT[0]
T = NT[1]
i = 1
mi = 9999
while i <= 3:
    a = list(map(int,input.split()))
    c = a[0]
    t = a[1]
    if t <= T and c < mi:
        mi = c
    i += 1

if mi == 9999:
    print("TLE")
else:
    print()


Input = input()
li = Input.split(" ")
NT = list(map(int,li))
N = NT[0]
T = NT[1]
i = 1
mi = 9999

while i <= N:
    Input = input()
    li = Input.split(" ")
    a = list(map(int,li))
    c = a[0]
    t = a[1]
    if t <= T and c < mi:
        mi = c
    i += 1

if mi == 9999:
    print("TLE")
else:
    print(mi)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
A, B = map(int,input().split())
cost = list()
m = B + 1
for i in range(A):
  x, y = map(int, input().split())
  if y < min:
    m = y
    cost.append(x)
print(min(cost) if m <= B else 'TLE')

A, B = map(int,input().split())
cost = list()
m = B + 1
for i in range(A):
  x, y = map(int, input().split())
  if y < m:
    cost.append(x)
print(min(cost) if len(cost) != 0 else 'TLE')

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, T = map(int, input().split())

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

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

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())

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)



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)


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
c=0
for _ in range(n):
  a,b=map(int,input().split())
  if b<=t:
    c=min(c,a)
print("TLE" if c==0 else c)

n,t=map(int,input().split())
ans=1001
for _ in range(n):
  cost,time=map(int,input().split())
  if time<=t:
    ans=min(ans,cost)
print(ans if ans!=1001 else "TLE")

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=input().split()
min=1001
for i in range(N):
  cost,time=input().split()
  if time<=T and cost<min:
    min=cost
if min==1001:
  print('TLE')
else:
  print(min)

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


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

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


N,T = map(int,input().split())
c = 0
for _ in range(N):
  _c, _t = map(int,input().split())
  if _t <= T:
    if c == 0:
      c = _c
    elif c != 0 and _c <= c:
      c = _c
print(c if c != 0 else "TLE")

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

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

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

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)

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T= map(int,input().split())
c = list(map(int,input().split()))
t = list(map(int,input().split()))
min = 1000
for i in range(n):
    if T > t[i] and min > c[i]:
        min = c[i]
if min ==1000:
    print('TLE')
else:
    print(min)


n,T = map(int,input().split())
c = list(map(int,input().split()))
t = list(map(int,input().split()))
min = 1000
for i in range(n):
    if T > t[i] and min > c[i]:
        min = c[i]
if min ==1000:
    print('TLE')
else:
    print(min)

n,T = map(int,input().split())
c = list(input().split())
t = list(input().split())
min = 1000
for i in range(n):
    if T > int(t[i]) and min > int(c[i]):
        min = int(c[i])
if min ==1000:
    print('TLE')
else:
    print(min)


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

min = 1000
for i in range(n):
    c,t = map(int,input().split())
    if T > t[i] and min > c[i]:
        min = c[i]
if min ==1000:
    print('TLE')
else:
    print(min)

n= int(input())
T = int(input())
c = list(input().split())
t = list(input().split())
min = 1000
for i in range(n):
    if int(T) > int(t[i]) and min > int(c[i]):
        min = int(c[i])
if min ==1000:
    print('TLE')
else:
    print(min)

n,T = map(int,input().split())
c = list(input().split())
t = list(input().split())
min = 1000
for i in range(n):
    if int(T) > int(t[i]) and min > int(c[i]):
        min = int(c[i])
if min ==1000:
    print('TLE')
else:
    print(min)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N = int(input())
T = int(input())
clist = []
for i in range(0, N):
    c = int(input())
    t = int(input())
    if t <= T:
        clist.append(c)
clist.sort()
if clist == []:
    print("TLE")
else:
    print(clist[0])


InStr = input()
InList = InStr.split()
N = int(InList[0])
T = int(InList[1])
ccalist = []
for i in range(N):
    InStr = input()
    InList = InStr.split()
    cc = int(InList[0])
    ct = int(InList[1])
    if ct <= T:
        ccalist.append(cc)
if ccalist == []:
    print("TLE")
else:
    ccalist.sort()
    print(ccalist[0])


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split())
mn = 10**10
for i in range(N):
    c,t = map(int,input().split())
    print(c,t)
    if t <= T and c <= mn:
        mn = c
if mn == 10**10:
    print("TLE")
else:
    print(mn)



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



Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):

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

ans = 1001

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

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

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


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

ans = 1001

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

if ans == 1001:
    ans = "TLE"
print(ans)


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

ans = 1001

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

if ans == 1001:
    ans = "TLE"
print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T=[int(i) for i in input().split()]
ans=[]
for i in range(n):
  c,t=[int(i) for i in input().split()]
  if t<=T:
    ans.append(c)
print(min(ans) if len(c)!=0 else "TLE")


n,T=[int(i) for i in input().split()]
ans=[]
for i in range(n):
  c,t=[int(i) for i in input().split()]
  if t<=T:
    ans.append(c)
print(min(ans) if len(ans)!=0 else "TLE")

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T = map(int,input().split())
ans = 2000
for i in range(n):
  c,t = map(int,input().split())
  if t <= T:
    ans = min(ans, t)
if ans == 2000:
  print('TLE')
else:
  print(ans)


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


Verdicts: Wrong Answer

Accepted