Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
print(sum(sorted(p)[:K])

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
print(sum(sorted(p)[:k]))
Buggy python submission (verdict: Runtime Error):
a = input()

print(a + a*a + a*a*a)

Fixed submission:
a = int(input())

print(a + a*a + a*a*a)
Buggy python submission (verdict: Runtime Error):
a = {'Sunny' : 'Cloudy', 'Cloudy': 'Rainy', 'Rainy': 'Sunny')
s = input()
print(a[s])

Fixed submission:
a = {'Sunny' : 'Cloudy', 'Cloudy': 'Rainy', 'Rainy': 'Sunny'}
s = input()
print(a[s])
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
pre = -1
for i in A:
  ans += B[i-1]
  if i == pre+1:
  	ans += C[i-1]
  pre = i
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
pre = -1
for i in A:
  ans += B[i-1]
  if i == pre+1:
  	ans += C[pre-1]
  pre = i
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

ans = 0
for i in range(len(s)):
  if s[i] == t[i]:
    ans += 1
print ans


Fixed submission:
s = input()
t = input()
ans = 0
for i in range(len(s)):
  if s[i] == t[i]:
    ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

ans = 0
for i in len(s):
  if s[i] == t[i]:
    ans += 1
print ans

Fixed submission:
s = input()
t = input()
ans = 0
for i in range(len(s)):
  if s[i] == t[i]:
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a, b, c = map(int, input().split())
return c - a + b

Fixed submission:
# -*- coding: utf-8 -*-
 
a, b, c = map(int, input().split())
rest = a - b
if c - rest < 0:
  print(0)
else:
  print (c - a + b)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
n = int(input())
if n / 10000 >= 1:
  print(9 + 900 + n - 10000 + 1)
else if n / 100 >= 1:
  print(9 + n - 100 + 1)
else if n / 10 >= 1:
  print(9)
else if n < 10:
  print(n)

Fixed submission:
# -*- coding: utf-8 -*-
 
n = int(input())
if n == 100000:
  print(90909)
elif n / 10000 >= 1:
  print(9 + 900 + n - 10000 + 1)
elif n / 1000 >= 1:
  print(909)
elif n / 100 >= 1:
  print(9 + n - 100 + 1)
elif n / 10 >= 1:
  print(9)
elif n < 10:
  print(n)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
 
n = int(input())
h = list(map(int, input().split()))
h.reverse()
r = 'Yes'
for i in range(n):
  for j in range(i+1, n):
    if h[j] > h[i] + 1:
      r = 'No'
      break
print(r)

Fixed submission:
# -*- coding: utf-8 -*-
 
n = int(input())
h = list(map(int, input().split()))
h.reverse()
limit = h[0]
r = 'Yes'
for i in range(n-1):
    if h[i] < limit:
      limit = h[i]
    if h[i+1] > limit + 1:
      r = 'No'
      break
    
print(r)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input())
h = input().split()
h.reverse()
for i in range(n):
  for j in range(i+1, n) 
    if h[j] > h[i] + 1:
      print('No')
      return
print('Yes')


Fixed submission:
# -*- coding: utf-8 -*-
 
n = int(input())
h = list(map(int, input().split()))
h.reverse()
limit = h[0]
r = 'Yes'
for i in range(n-1):
    if h[i] < limit:
      limit = h[i]
    if h[i+1] > limit + 1:
      r = 'No'
      break
    
print(r)
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    S = str(input())

    if N % 2 == 1:
        print('No')
        return 0

    s_start = S[:N//2]
    s_end = S[N//2:]

    is s_start == s_end:
        print('Yes')
    else:
        print('No')
    return 0


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    N = int(input())
    S = str(input())

    if N % 2 == 1:
        print('No')
        return 0

    s_start = S[:N//2]
    s_end = S[N//2:]

    if s_start == s_end:
        print('Yes')
    else:
        print('No')
    return 0


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
N = int(input())
if N % 2 == 0:
  print('No')
S = str(input())

s_start = S[:N//2]
s_end = S[N//2:]
is s_start == s_end:
  print('Yes')
else:
  print('No')


Fixed submission:
def main():
    N = int(input())
    S = str(input())

    if N % 2 == 1:
        print('No')
        return 0

    s_start = S[:N//2]
    s_end = S[N//2:]

    if s_start == s_end:
        print('Yes')
    else:
        print('No')
    return 0


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
x, y = list(map(int, input().split()))
arr = list(map(int, input().split()))


def quick_sort(arr):
    left = []
    right = []
    if len(arr) <= 1:
        return arr
    if(1 <= x, y <= 1000 and 1 <= max(arr) <= 1000 and 1 <= min(arr) <= 1000):
        # データの状態に左右されないためにrandom.choice()を用いることもある。
        # ref = random.choice(arr)
        ref = arr[0]
        ref_count = 0

        for ele in arr:
            if ele < ref:
                left.append(ele)
            elif ele > ref:
                right.append(ele)
            else:
                ref_count += 1
        left = quick_sort(left)
        right = quick_sort(right)
        return left + [ref] * ref_count + right


sorted_list = quick_sort(arr)

result = sorted_list[0] + sorted_list[1] + sorted_list[2]

print(result)

Fixed submission:
x, y = list(map(int, input().split()))
arr = list(map(int, input().split()))


def quick_sort(arr):
    left = []
    right = []
    if len(arr) <= 1:
        return arr
    if(1 <= x, y <= 1000 and 1 <= max(arr) <= 1000 and 1 <= min(arr) <= 1000):
        ref = arr[0]
        ref_count = 0

        for ele in arr:
            if ele < ref:
                left.append(ele)
            elif ele > ref:
                right.append(ele)
            else:
                ref_count += 1
        left = quick_sort(left)
        right = quick_sort(right)
        return left + [ref] * ref_count + right


sorted_list = quick_sort(arr)

result = 0

for i in range(0, y):
    result += sorted_list[i]


print(result)

Buggy python submission (verdict: Runtime Error):
x, y = list(map(int, input().split()))
arr = list(map(int, input().split()))


def bubble_sort(arr):
    change = True
    while(change):
        change = False
        if(1 <= x, y <= 1000 and 1 <= max(arr) <= 1000 and 1 <= min(arr) <= 1000):
            for i in range(len(arr) - 1):
                if arr[i] > arr[i + 1]:
                    arr[i], arr[i + 1] = arr[i + 1], arr[i]
                    change = True
    return arr


sorted_list = bubble_sort(arr)

result = sorted_list[0] + sorted_list[1] + sorted_list[2]

print(result)

Fixed submission:
x, y = list(map(int, input().split()))
arr = list(map(int, input().split()))


def quick_sort(arr):
    left = []
    right = []
    if len(arr) <= 1:
        return arr
    if(1 <= x, y <= 1000 and 1 <= max(arr) <= 1000 and 1 <= min(arr) <= 1000):
        ref = arr[0]
        ref_count = 0

        for ele in arr:
            if ele < ref:
                left.append(ele)
            elif ele > ref:
                right.append(ele)
            else:
                ref_count += 1
        left = quick_sort(left)
        right = quick_sort(right)
        return left + [ref] * ref_count + right


sorted_list = quick_sort(arr)

result = 0

for i in range(0, y):
    result += sorted_list[i]


print(result)
Buggy python submission (verdict: Runtime Error):
turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if turu * x + kame * y == b and x + y <= a:
            flag += 1

if flag == 0:
    print("No")
else:
    print("Yes")

Fixed submission:
# 動物の数がX匹、　足の総数がY本
X,Y = map(int,input().split())
#print(X,Y)
turu = 2
kame = 4
flag = False
for i in range(0, X + 1): # 0, 1, 2, 3
    #print("亀が{0}匹の場合".format(i))
    turu_num = X - i
    #print("鶴は{0}匹".format(turu_num))
    leg_total = kame * i + turu_num * turu
    #print("足の総数は{0}".format(leg_total))
    if(leg_total == Y):
      flag = True
      break
#    for q in range(0, X - i + 1):
#        print("鶴は{0}匹".format(q))
#        if kame * i + turu * q == Y and (i + q) <= X:
#            flag += 1
if flag:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = int(input())
x  = 0
lists = []
ass =[]
#bが気温c、standardが平均気温の基準
b,standard = map(int,input().split())
#標高
elev = list(map(int,input().split()))

for i in range(a):
    lists.append(abs(b - elev[i] * 0.006 - standard))

m = min(lists)
mindex = lists.index(1.0)
print(mindex + 1)


Fixed submission:
a = int(input())
x  = 0
lists = []
ass =[]
#bが気温c、standardが平均気温の基準
b,standard = map(int,input().split())
#標高
elev = list(map(int,input().split()))

for i in range(a):
    lists.append(abs(b - elev[i] * 0.006 - standard))

m = min(lists)
mindex = lists.index(m)
print(mindex + 1)

Buggy python submission (verdict: Runtime Error):
a = int(input())
x  = 0
lists = []
ass =[]
#bが気温c、standardが平均気温の基準
b,standard = map(int,input().split())
#標高
elev = list(map(int,input().split()))

for i in range(a):
    lists.append(abs(b - elev[i] * 0.006 - standard))
    print(lists)

m = min(lists)
mindex = lists.index(1.0)
print(mindex + 1)


Fixed submission:
a = int(input())
x  = 0
lists = []
ass =[]
#bが気温c、standardが平均気温の基準
b,standard = map(int,input().split())
#標高
elev = list(map(int,input().split()))

for i in range(a):
    lists.append(abs(b - elev[i] * 0.006 - standard))

m = min(lists)
mindex = lists.index(m)
print(mindex + 1)
Buggy python submission (verdict: Runtime Error):
for i in range(N):
    print(i)
    if x >= sort_a[i]:
        count += 1
        x -= sort_a[i]
        # print(x)
        continue
    break
print(count)

Fixed submission:
N,x = map(int,input().split())
a = list(map(int,input().split()))
count = 0
#昇順に並べ替える
# sort_a = sorted(a)
a.sort(reverse=False)
for i in range(N):
    if x >= a[i]:
        count += 1
        x -= a[i]
    else:
        break

if (x!=0)and(count == N):
    count -= 1
print(count)

Buggy python submission (verdict: Runtime Error):
N,x = map(int,input().split())
# a=[int(input()) for i in range(4)]
a = list(map(int,input().split()))
count = 0
#昇順に並べ替える
sort_a = sorted(a)

for i in range(len(N)):
    if x >= sort_a[i]:
        count += 1
        x -= sort_a[i]
    break
print(count)


Fixed submission:
N,x = map(int,input().split())
a = list(map(int,input().split()))
count = 0
#昇順に並べ替える
# sort_a = sorted(a)
a.sort(reverse=False)
for i in range(N):
    if x >= a[i]:
        count += 1
        x -= a[i]
    else:
        break

if (x!=0)and(count == N):
    count -= 1
print(count)

Buggy python submission (verdict: Runtime Error):
N,x = map(int,input().split())
# a=[int(input()) for i in range(4)]
a = list(map(int,input().split()))
count = 0
#昇順に並べ替える
sort_a = sorted(a)

for i in range(len(N)):
    if x >= sort_a[i]:
        count += 1
        x -= sort_a[i]
        print(x)
        continue
    break
print(count)


Fixed submission:
N,x = map(int,input().split())
a = list(map(int,input().split()))
count = 0
#昇順に並べ替える
# sort_a = sorted(a)
a.sort(reverse=False)
for i in range(N):
    if x >= a[i]:
        count += 1
        x -= a[i]
    else:
        break

if (x!=0)and(count == N):
    count -= 1
print(count)

Buggy python submission (verdict: Runtime Error):
N,x = map(int,input().split())
a=[int(input()) for i in range(N)]
# a = list(map(int,input().split()))
count = 0
#昇順に並べ替える
sort_a = sorted(a)

for i in range(len(a)):
    if x >= sort_a[i]:
        count += 1
        x -= sort_a[i]
        continue
    break
print(count)

Fixed submission:
N,x = map(int,input().split())
a = list(map(int,input().split()))
count = 0
#昇順に並べ替える
# sort_a = sorted(a)
a.sort(reverse=False)
for i in range(N):
    if x >= a[i]:
        count += 1
        x -= a[i]
    else:
        break

if (x!=0)and(count == N):
    count -= 1
print(count)
Buggy python submission (verdict: Runtime Error):
a = input()
x = 0
while 2**x <=a:
    boxs = 2 ** x
    x += 1
print(boxs)

Fixed submission:

N=int(input())
k=0
while 2**k <= N:
    ans = 2**k
    k += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
import collections


x = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

prime = prime_factorize(x)[0]

a,b = 0,-prime
while True:
    if x == a**5 - (b)**5:
        print(a,b)
        break
    else:
        a += 1
        b += 1

Fixed submission:
s = str(input())
print('ABC') if s == 'ARC' else print('ARC')
Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
a = list(map(int,input().split()))
s = sum([i*(i-1)//2 for i in collections.Counter(a).values()])

for j in a:
    print(s-a.count(j)+1) 

Fixed submission:
import collections

n = int(input())
a = list(map(int,input().split()))
d = collections.Counter(a)
s = sum([i*(i-1)//2 for i in d.values()])

for j in a:
    print(s-d[j]+1)

Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
a = list(map(int,input().split()))

s = sum([i*(i-1)//2 for i in collections.Counter(a).values()])

for j in a:
    print(s - a.count(j)+1)


Fixed submission:
import collections

n = int(input())
a = list(map(int,input().split()))
d = collections.Counter(a)
s = sum([i*(i-1)//2 for i in d.values()])

for j in a:
    print(s-d[j]+1)

Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
a = list(map(int,input().split()))

for i in range(n):
    l = a[:i]+a[i+1:]
    pattern = 0
    pattern += sum([j*(j-1)//2 for j in collections.Counter(l).values()])
    print(pattern)

Fixed submission:
import collections

n = int(input())
a = list(map(int,input().split()))
d = collections.Counter(a)
s = sum([i*(i-1)//2 for i in d.values()])

for j in a:
    print(s-d[j]+1)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

for i in range(n):
    l = a[:i]+a[i+1:]
    pattern = 0
    for j in set(l):
        sum = l.count(j)
        pattern += sum*(sum-1)//2
    print(pattern)

Fixed submission:
import collections

n = int(input())
a = list(map(int,input().split()))
d = collections.Counter(a)
s = sum([i*(i-1)//2 for i in d.values()])

for j in a:
    print(s-d[j]+1)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

for i in range(n):
    l = a[:i]+a[i+1:]
    pattern = 0
    for j in range(n):
        sum = l.count(j)
        pattern += sum*(sum-1)//2
    print(pattern)

Fixed submission:
import collections

n = int(input())
a = list(map(int,input().split()))
d = collections.Counter(a)
s = sum([i*(i-1)//2 for i in d.values()])

for j in a:
    print(s-d[j]+1)
Buggy python submission (verdict: Runtime Error):
n = int(input())                    
d = list(map(int,input().split()))

sorted_d = sorted(d)
half = n/2

a = sorted_d[half]
b = sorted_d[half+1]

print(b-a)


Fixed submission:
n = int(input())                   
d = list(map(int,input().split()))

sorted_d = sorted(d)
half = n//2

a = sorted_d[half-1]
b = sorted_d[half]

print(b-a)

Buggy python submission (verdict: Runtime Error):
n = int(input())                                                                                                                                                             
d = list(map(int,input().split()))

sorted_d = sorted(d)
half = n/2 

sorted_d[half] = a 
sorted_d[half+1] = b 

print(b-a)

Fixed submission:
n = int(input())                   
d = list(map(int,input().split()))

sorted_d = sorted(d)
half = n//2

a = sorted_d[half-1]
b = sorted_d[half]

print(b-a)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

n,k = map(int, input().split())
s = input()

low = s[k].lower()
print(s[:k]+low+s[k+1:])

Fixed submission:
# coding: utf-8

n,k = map(int, input().split())
s = input()

low = s[k-1].lower()
print(s[:k-1]+low+s[k:])
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8

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

p = 0
for i in range(n):
    j = i + 1
    t = 0
    while j < k:
        j **= 2
        t += 1
    p += ((1/2)**t)/n

print(p)


Fixed submission:
# coding: utf-8

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

p = 0
for i in range(n):
    j = i + 1
    t = 0
    while j < k:
        j *= 2
        t += 1
    p += ((1/2)**t)/n

print(p)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

s = input()

a1 = ['A','T']
a2 = ['C','G']

print(s)
if s in a1:
    l = a1
else:
    l = a2

l.discard(s)

print(l[0])



Fixed submission:
# coding: utf-8

s = input()

a1 = ['A','T']
a2 = ['C','G']

if s in a1:
    l = a1
else:
    l = a2

t = l.pop(l.index(s))
print(l[0])
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = sorted(list(map(int, input().split())), reverse=True)

if m == 1:
    S =0
else:
    d = sorted([l[i] - l[i+1]  for i in range(m-1)], reverse=True)
    S = max(l) - min(l)

    if n > 1:
        for i in range(n-1):
            S -= d[i]
    else:
        S = l[0]

print(S)


Fixed submission:
n, m = map(int, input().split())
l = sorted(list(map(int, input().split())), reverse=True)

if n>=m or m == 1:
    S =0
else:
    d = sorted([l[i] - l[i+1]  for i in range(m-1)], reverse=True)
    S = max(l) - min(l)
    for i in range(n-1):
        S -= d[i]

print(S)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = sorted(list(map(int, input().split())), reverse=True)

if m == 1 and n == 1:
    S =0
else:
    d = sorted([l[i] - l[i+1]  for i in range(m-1)], reverse=True)
    S = max(l) - min(l)

    for i in range(n-1):
        S -= d[i]

print(S)


Fixed submission:
n, m = map(int, input().split())
l = sorted(list(map(int, input().split())), reverse=True)

if n>=m or m == 1:
    S =0
else:
    d = sorted([l[i] - l[i+1]  for i in range(m-1)], reverse=True)
    S = max(l) - min(l)
    for i in range(n-1):
        S -= d[i]

print(S)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
if m == 1 and n == 1:
    S =0
else:
    l = sorted(list(map(int, input().split())), reverse=True)
    d = sorted([l[i] - l[i+1]  for i in range(m-1)], reverse=True)
    S = max(l) - min(l)

    for i in range(n-1):
        S -= d[i]

print(S)

Fixed submission:
n, m = map(int, input().split())
l = sorted(list(map(int, input().split())), reverse=True)

if n>=m or m == 1:
    S =0
else:
    d = sorted([l[i] - l[i+1]  for i in range(m-1)], reverse=True)
    S = max(l) - min(l)
    for i in range(n-1):
        S -= d[i]

print(S)
Buggy python submission (verdict: Runtime Error):
a = sorted(list(int, input().split()))

print(a[0]*b[1])



Fixed submission:
# coding: utf-8

a, b, c = map(int, input().split())
M = max(a,b,c)
x = a*b*c//(M*2)
print(x)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

s = int(input())

i = 0
while n > 0:
    if n % 2 == 0:
        n = n / 2
    else:
        n = 3n+1
    if n == 4:
        break
    else:
        i += 1

print(i+4)

Fixed submission:
# coding: utf-8

n = int(input())

i = 1
while n > 0:
    if n == 4 or n == 2 or n == 1:
        break
    i += 1
    if n % 2 == 0:
        n = n / 2
    else:
        n = n*3+1

print(i+3)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8

s = int(input())

i = 0
while n > 0:
    if n % 2 = 0:
        n = n / 2
    else:
        n = 3n+1
    if n == 4:
        break
    else:
        i += 1

print(i+4)

Fixed submission:
# coding: utf-8

n = int(input())

i = 1
while n > 0:
    if n == 4 or n == 2 or n == 1:
        break
    i += 1
    if n % 2 == 0:
        n = n / 2
    else:
        n = n*3+1

print(i+3)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

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

l,p = [1],[1]
for i in range(n):
    l.append(a[i]*2+3)
    p.append(a[i]*2+1)

def f(n,x):
    if n == 0:
        return 0 if x <= 0 else 1
    elif x <= 1 + l[n-1]:
        return f(n-1,x-1)
    else:
        return p[n-1]+1+f(n-1,x-2-l[n-1])

print(f(n,x))


Fixed submission:
# coding: utf-8

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

l,p = [1],[1]
for i in range(n):
    l.append(l[i]*2+3)
    p.append(p[i]*2+1)

def f(n,x):
    if n == 0:
        return 0 if x <= 0 else 1
    elif x <= 1 + l[n-1]:
        return f(n-1,x-1)
    else:
        return p[n-1]+1+f(n-1,x-2-l[n-1])

print(f(n,x))

Buggy python submission (verdict: Runtime Error):
# coding: utf-8

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

l,p = [1],[1]
for i in range(n):
    l.append(a[i]*2+3)
    p.append(a[i]*2+1)

def f(n,x):
    if n == 0:
        return 0 if x <= 0 else 1
    elif x <= 1 + a[n-1]:
        return f(n-1,x-1)
    else:
        return p[n-1]+1+f(n-1,x-2-a[n-1])

print(f(n,x))


Fixed submission:
# coding: utf-8

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

l,p = [1],[1]
for i in range(n):
    l.append(l[i]*2+3)
    p.append(p[i]*2+1)

def f(n,x):
    if n == 0:
        return 0 if x <= 0 else 1
    elif x <= 1 + l[n-1]:
        return f(n-1,x-1)
    else:
        return p[n-1]+1+f(n-1,x-2-l[n-1])

print(f(n,x))
Buggy python submission (verdict: Runtime Error):
N,T = map(int, input().split())

c_list = []

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

print(min(c_list))


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

c_list = []

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

print(min(c_list)) if len(c_list) > 0 else print('TLE')
Buggy python submission (verdict: Runtime Error):
=input()
T=input()

ans = 0
for i in range(len(S)):
    if S[i] != T[i]:
        ans += 1
print(ans)

Fixed submission:
S=input()
T=input()

ans = 0
for i in range(len(S)):
    if S[i] != T[i]:
        ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int,input().split()))

ans = 0
for i in range(n):
    cnt = 0
    for j in range(n):
        if i == j:
            continue
        if A[i]%A[j] == 0:
            cnt += 1
            break
    if cnt == 0:
        ans += 1

print(ans)

Fixed submission:
n = int(input())
A = list(map(int,input().split()))

A.sort()
dp = [True for _ in range(A[-1]+1)]

for i in range(n-1):#同じものがいたらその番号をfalseにする
    if A[i] == A[i+1]:
        dp[A[i]] = False

res = 0
for a in A:
    if dp[a]:
        res += 1
    for b in range(a,len(dp),a):#aの倍数を削除する
        dp[b] = False
print(res)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))

ans=1
for a in A:
    ans *= a

if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))

ans=1
for a in A:
    ans *= a
    if ans > 10**18:
        if 0 in A:
            ans = 0
        else:
            ans = -1
        break

print(ans)
Buggy python submission (verdict: Runtime Error):
A,B =input().split()
print(int(A*(B*100)/100))

Fixed submission:
A,B =map(str,input().split())
B_100=int(B.replace('.',''))
print(int(A)*(B_100)//100)
Buggy python submission (verdict: Runtime Error):
N=int(input())

N_sum=list(range(N))
print(sum(N_sum))

Fixed submission:
N=int(input())
print(int(N*(N-1)//2))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

ans = 0
for c in C:
    for b in B:
        for a in A:
            if c > b & b > a:
                ans += 1
print(ans)

Fixed submission:
import bisect
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

A.sort()
B.sort()
C.sort()

ans = 0
for b in B:
    a=bisect.bisect_left(A,b)
    c=bisect.bisect_right(C,b)
    ans += a *(N-c)
print(ans)
Buggy python submission (verdict: Runtime Error):
str1 =str(input())
s1 = str1.split(' ')
m = int(s1[0])
n = int(s1[1])
x = (m*(m-1))/2
y = (n*(n-1))/2
print(int((x+y))

Fixed submission:
str1 =str(input())
s1 = str1.split(' ')
m = int(s1[0])
n = int(s1[1])
x = (m*(m-1))/2
y = (n*(n-1))/2
print(int(x+y))