Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import product

N, K = map(int, input().split())
x, y = [None] * N, [None] * N
for i in range(N):
    x[i], y[i] = map(int, input().split())

ans = float('inf')
for i, j, k, l in product(range(N), repeat=4):
    x1, x2 = x[i], x[j]
    y1, y2 = y[k], y[l]
    cnt = 0
    for xx, yy in zip(x, y):
        if x1 <= xx <= x2 and y1 <= yy <= y2:
            cnt += 1
    if cnt >= K:
        s = abs(x1 - x2) * abs(y1 - y2)
        ans = min(ans, s)
print(ans)



Fixed submission:
from itertools import product

N, K = map(int, input().split())
x, y = [None] * N, [None] * N
for i in range(N):
    x[i], y[i] = map(int, input().split())

xary = sorted(x)
yary = sorted(y)

ans = float('inf')
for i, j, k, l in product(range(N), repeat=4):
    if i >= j or k >= l:
        continue
    x1, x2 = xary[i], xary[j]
    y1, y2 = yary[k], yary[l]
    cnt = 0
    for xx, yy in zip(x, y):
        if x1 <= xx <= x2 and y1 <= yy <= y2:
            cnt += 1
    if cnt >= K:
        s = abs(x1 - x2) * abs(y1 - y2)
        ans = min(ans, s)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import product

N, K = map(int, input().split())
x, y = [None] * N, [None] * N
for i in range(N):
    x[i], y[i] = map(int, input().split())

ans = float('inf')
for i, j, k, l in product(range(N), repeat=4):
    x1, x2 = x[i], x[j]
    y1, y2 = y[k], y[l]
    cnt = 0
    for xx, yy in zip(x, y):
        if x1 <= xx <= x2 and y1 <= yy <= y2:
            cnt += 1
    if cnt >= K:
        s = abs(x1 - x2) * abs(y1 - y2)
        ans = min(ans, s)
print(ans)



Fixed submission:
from itertools import product

N, K = map(int, input().split())
x, y = [None] * N, [None] * N
for i in range(N):
    x[i], y[i] = map(int, input().split())

xary = sorted(x)
yary = sorted(y)

ans = float('inf')
for i, j, k, l in product(range(N), repeat=4):
    if i >= j or k >= l:
        continue
    x1, x2 = xary[i], xary[j]
    y1, y2 = yary[k], yary[l]
    cnt = 0
    for xx, yy in zip(x, y):
        if x1 <= xx <= x2 and y1 <= yy <= y2:
            cnt += 1
    if cnt >= K:
        s = abs(x1 - x2) * abs(y1 - y2)
        ans = min(ans, s)
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int, input().split())


def f(x, y):
    max_i = F // x
    max_j = F // y
    arr = []
    for i in range(max_i + 1):
        for j in range(max_j + 1):
            a = x * i + y * j
            if 0 < a < F:
                arr.append(a)
    return sorted(list(set(arr)))


water = f(100 * A, 100 * B)
sugar = f(C, D)

ans = []
for w in water:
    for s in sugar:
        if w + s <= F and s / w * 100 <= E:
            ans.append((w + s, s))
ans = sorted(ans, key=lambda x: x[1] / x[0], reverse=True)
print(ans[0][0], ans[0][1])

Fixed submission:
from operator import itemgetter

A, B, C, D, E, F = map(int, input().split())


def f(x, y):
    max_i = F // x
    max_j = F // y
    arr = []
    for i in range(max_i + 1):
        for j in range(max_j + 1):
            a = x * i + y * j
            if a <= F:
                arr.append(a)
    return list(set(arr))


water = f(100 * A, 100 * B)
sugar = f(C, D)

ans = []
for w in water:
    if w == 0:
        continue
    for s in sugar:
        if w + s <= F and s / w <= E / 100:
            ans.append((w + s, s, s / (w + s)))
ans = sorted(ans, key=itemgetter(2), reverse=True)
print(ans[0][0], ans[0][1])
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import permutations, product

N, M, R = map(int, input().split())
r = [int(x) for x in input().split()]
abc = [[int(x) for x in input().split()] for _ in range(M)]

dist = [[float('inf') for _ in range(N)] for _ in range(N)]
for a, b, c in abc:
    dist[a - 1][b - 1] = c
    dist[b - 1][a - 1] = c

for k, i, j in product(range(N), repeat=3):
    dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

ans = float('inf')
for route in permutations(r):
    d = 0
    for i in range(R - 1):
        s = route[i] - 1
        g = route[i + 1] - 1
        d += dist[s][g]
    ans = min(ans, d)
print(ans)

Fixed submission:
from itertools import permutations, product

N, M, R = map(int, input().split())
r = [int(x) for x in input().split()]
abc = [[int(x) for x in input().split()] for _ in range(M)]

dist = [[float('inf') for _ in range(N)] for _ in range(N)]
for a, b, c in abc:
    dist[a - 1][b - 1] = c
    dist[b - 1][a - 1] = c

for k, i, j in product(range(N), repeat=3):
    dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

ans = float('inf')
for route in permutations(r):
    d = 0
    for i in range(R - 1):
        s = route[i] - 1
        g = route[i + 1] - 1
        d += dist[s][g]
    ans = min(ans, d)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = [int(input()) for _ in range(N)]

i = 1
c = 0
while True:
    i = a[i - 1]
    c += 1
    if i == 1:
        c = -1
        break
    elif i == 2:
        break
print(c)


Fixed submission:
N = int(input())
a = [int(input()) for _ in range(N)]

i = 1
c = 0
ans = -1
for _ in range(N):
    i = a[i - 1]
    c += 1
    if i == 2:
        ans = c
        break
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from heapq import heappush, heappop

N = int(input())
a = [int(x) for x in input().split()]

left = sorted(a[:N])
max_left = [sum(left)]

right = sorted([-x for x in a[-N:]])
min_right = [sum(right) * -1]

for i in range(N, 2 * N):
    heappush(left, a[i])
    heappop(left)
    max_left.append(sum(left))

    heappush(right, a[3 * N - i - 1] * -1)
    heappop(right)
    min_right.append(sum(right) * -1)

ans = float('-inf')
for l, r in zip(max_left, min_right[::-1]):
    ans = max(l - r, ans)
print(ans)


Fixed submission:
from heapq import heappush, heappop

N = int(input())
a = [int(x) for x in input().split()]

left = sorted(a[:N])
max_left = [sum(left)]

right = sorted([-x for x in a[-N:]])
min_right = [sum(right) * -1]

for i in range(N, 2 * N):
    j = 3 * N - i - 1

    heappush(left, a[i])
    v = heappop(left)
    max_left.append(max_left[-1] - v + a[i])

    heappush(right, a[j] * -1)
    v = heappop(right) * -1
    min_right.append(min_right[-1] - v + a[j])

ans = float('-inf')
for l, r in zip(max_left, min_right[::-1]):
    ans = max(l - r, ans)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from heapq import heappush, heappop

N = int(input())
a = [int(x) for x in input().split()]

left = sorted(a[:N])
max_left = [sum(left)]

right = sorted([-x for x in a[-N:]])
min_right = [sum(right) * -1]

for i in range(N, 2 * N):
    heappush(left, a[i])
    heappop(left)
    max_left.append(sum(left))

    heappush(right, a[3 * N - i - 1] * -1)
    heappop(right)
    min_right.append(sum(right) * -1)

ans = float('-inf')
for l, r in zip(max_left, min_right[::-1]):
    ans = max(l - r, ans)
print(ans)


Fixed submission:
from heapq import heappush, heappop

N = int(input())
a = [int(x) for x in input().split()]

left = sorted(a[:N])
max_left = [sum(left)]

right = sorted([-x for x in a[-N:]])
min_right = [sum(right) * -1]

for i in range(N, 2 * N):
    j = 3 * N - i - 1

    heappush(left, a[i])
    v = heappop(left)
    max_left.append(max_left[-1] - v + a[i])

    heappush(right, a[j] * -1)
    v = heappop(right) * -1
    min_right.append(min_right[-1] - v + a[j])

ans = float('-inf')
for l, r in zip(max_left, min_right[::-1]):
    ans = max(l - r, ans)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
from itertools import product

N = int(input())


def prime_decomposition(n):
    i = 2
    p = []
    while i * i <= n:
        while n % i == 0:
            n //= i
            p.append(i)
        i += 1
    if n > 1:
        p.append(n)
    return p


def F(a, b):
    a = int(math.log10(a)) + 1
    b = int(math.log10(b)) + 1
    return max(a, b)


p = prime_decomposition(N)

ans = float('inf')
for x in product([True, False], repeat=len(p)):
    a, b = 1, 1
    for i in range(len(p)):
        if x[i]:
            a *= p[i]
        else:
            b *= p[i]
    ans = min(ans, F(a, b))
print(ans)


Fixed submission:
import math

N = int(input())


def F(a, b):
    a = int(math.log10(a)) + 1
    b = int(math.log10(b)) + 1
    return max(a, b)


ans = float('inf')
for i in range(1, int(math.sqrt(N)) + 1):
    if N % i != 0:
        continue
    a, b = i, N // i
    ans = min(ans, F(a, b))
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10**6)

N, M = map(int, input().split())
graph = [set([]) for _ in range(M)]
for _ in range(M):
    a, b = map(int, input().split())
    graph[a - 1].add(b - 1)
    graph[b - 1].add(a - 1)


def dfs(graph, visited, v):
    if all(visited):
        return 1

    cnt = 0
    for u in graph[v]:
        if visited[u]:
            continue
        visited[u] = True
        cnt += dfs(graph, visited, u)
        visited[u] = False

    return cnt


visited = [False] * len(graph)
visited[0] = True
ans = dfs(graph, visited, 0)
print(ans)


Fixed submission:
import sys

sys.setrecursionlimit(10**6)

N, M = map(int, input().split())
graph = [set([]) for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    graph[a - 1].add(b - 1)
    graph[b - 1].add(a - 1)


def dfs(graph, visited, v):
    if all(visited):
        return 1

    cnt = 0
    for u in graph[v]:
        if visited[u]:
            continue
        visited[u] = True
        cnt += dfs(graph, visited, u)
        visited[u] = False

    return cnt


visited = [False] * len(graph)
visited[0] = True
ans = dfs(graph, visited, 0)
print(ans)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
graph = [set([]) for _ in range(M)]
for _ in range(M):
    a, b = map(int, input().split())
    graph[a - 1].add(b - 1)
    graph[b - 1].add(a - 1)


def dfs(graph, visited, v):
    if all(visited):
        return 1

    cnt = 0
    for u in graph[v]:
        if visited[u]:
            continue
        visited[u] = True
        cnt += dfs(graph, visited, u)
        visited[u] = False

    return cnt


visited = [False] * len(graph)
visited[0] = True
ans = dfs(graph, visited, 0)
print(ans)


Fixed submission:
import sys

sys.setrecursionlimit(10**6)

N, M = map(int, input().split())
graph = [set([]) for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    graph[a - 1].add(b - 1)
    graph[b - 1].add(a - 1)


def dfs(graph, visited, v):
    if all(visited):
        return 1

    cnt = 0
    for u in graph[v]:
        if visited[u]:
            continue
        visited[u] = True
        cnt += dfs(graph, visited, u)
        visited[u] = False

    return cnt


visited = [False] * len(graph)
visited[0] = True
ans = dfs(graph, visited, 0)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict

N, T = map(int, input().split())
A = [int(x) for x in input().split()]

c = defaultdict(int)
for i in range(N - 1):
    x = max(A[i + 1:])
    c[x - A[i]] += 1
print(c[max(c)])


Fixed submission:
from collections import defaultdict

N, T = map(int, input().split())
A = [int(x) for x in input().split()]

B = [0] * N
for i in range(N - 1):
    a = A[N - i - 1]
    B[i + 1] = max(B[i], a)
B = B[::-1]

c = defaultdict(int)
for i in range(N - 1):
    c[B[i] - A[i]] += 1
print(c[max(c)])
Buggy python submission (verdict: Runtime Error):
x, a = int(input())
 
if x >= a:
  print(10)
elif x < a:
  print(0)
else:
  pass

Fixed submission:
x, a = map(int,input().split())

if x >= a:
  print(10)
elif x < a:
  print(0)
else:
  pass

Buggy python submission (verdict: Runtime Error):
x, a = input()

if x >= a:
  print(10)
elif x < a:
  print(0)
else:
  pass

Fixed submission:
x, a = map(int,input().split())

if x >= a:
  print(10)
elif x < a:
  print(0)
else:
  pass
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
count = 1
for i in range(N+1):
    D += L[i]
    if D > X:
        print(count)
        exit()
    else:
        count += 1

Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
count = 1
for i in range(N):
    D += L[i]
    if D > X:
        print(count)
        exit()
    else:
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
#!/bin/usr/python3
# -*- coding: utf-8 -*-

N, K = map(int, input().split())
S = list(input())

S[K] = S[K].lower()
S_out = "".join(S)
print(S_out)

Fixed submission:
#!/bin/usr/python3
# -*- coding: utf-8 -*-

N, K = map(int, input().split())
S = list(input())

S[K-1] = S[K-1].lower()
S_out = "".join(S)
print(S_out)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

n = int(input())
h = input().split()
count = 0
flag = 0

for i in range(n):
    #print(i)
    for j in range(i):
        if h[i] < h[i-1-j]:
            #print("{} {}".format(h[i-j], h[i]))
            flag = 1
            break
    if flag == 0:
        count += 1
    else:
        flag = 0

print(count)

Fixed submission:
# -*- coding:utf-8 -*-

a, b =  map(int, input().split())
#print("{} {}".format(a, b))
point = 0
for i in range(2):
    if a >= b:
        point += a
        a -= 1
    else:
        point += b
        b -= 1
print(point)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-

x, y, z, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

yam = []
for l in range(x):
    for m in range(y):
        for n in range(z):
            yam.append(a[l]+b[m]+c[n])
yam.sort(reverse=True)
#print(yam)

for l in range(k):
        print(yam[l])

Fixed submission:
# -*- coding:utf-8 -*-

import heapq

x, y, z, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

yam = []
for l in range(x):
    for m in range(y):
        for n in range(z):
            if k < len(yam) and a[l]+b[m]+c[n] <= yam[0]:
                break
            elif k < len(yam):
                heapq.heappushpop(yam, a[l]+b[m]+c[n])
            else:
                heapq.heappush(yam, a[l]+b[m]+c[n])
yam.sort(reverse=True)
#print(yam)

for l in range(k):
        print(yam[l])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-

x, y, z, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

yam = []
for l in range(x):
    for m in range(y):
        for n in range(z):
            yam.append(a[l]+b[m]+c[n])
yam.sort(reverse=True)
#print(yam)

for l in range(k):
        print(yam[l])

Fixed submission:
# -*- coding:utf-8 -*-

import heapq

x, y, z, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

yam = []
for l in range(x):
    for m in range(y):
        for n in range(z):
            if k < len(yam) and a[l]+b[m]+c[n] <= yam[0]:
                break
            elif k < len(yam):
                heapq.heappushpop(yam, a[l]+b[m]+c[n])
            else:
                heapq.heappush(yam, a[l]+b[m]+c[n])
yam.sort(reverse=True)
#print(yam)

for l in range(k):
        print(yam[l])
Buggy python submission (verdict: Runtime Error):
x,a=map(int,input().split())
if x>a
 print("0")
else x<=a
 print("10")

Fixed submission:
x,a=map(int,input().split())
print(0 if x<a else 10)
Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
L=list(map(int,input().split()))

d=0
count=1
for l in L
    d=d+1
    if X>=d:
      count +=1
      
print(count)


Fixed submission:
X,A = map(int,input().split())
L = list(map(int,input().split()))
 
d = 0
count = 1
for l in L:
    d = d + l
    if A>= d:
        count += 1
        
    
print(count)

Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
L=list(map(int,input().split()))

d=0
count=1
for l in L
 d=d+1
  if X>=d:
  count +=1
print(count)


Fixed submission:
X,A = map(int,input().split())
L = list(map(int,input().split()))
 
d = 0
count = 1
for l in L:
    d = d + l
    if A>= d:
        count += 1
        
    
print(count)

Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
L=list(map(int,input().split()))

d=0
count=1
for l in L
 d=d+1
 if X>=d:
  count +=1
print(count)


Fixed submission:
X,A = map(int,input().split())
L = list(map(int,input().split()))
 
d = 0
count = 1
for l in L:
    d = d + l
    if A>= d:
        count += 1
        
    
print(count)
Buggy python submission (verdict: Runtime Error):
a, b= map(int, input().split())
A=[]
A = [list(input().split())   for i in range(a)]
B=[]
for i in A:
  s=int(i[0])
  v=int(i[1])+1
  for j in range(s,v):
    B.append(j)
C = [x for x in set(B) if B.count(x) > 1]
print(len(C))
 

Fixed submission:
n,m = [int(i) for i in input().split()]
rang = []
lmax = 0
rmin = 10**10
for i in range(m):
    l,r = [int(i) for i in input().split()]
    lmax = max(l,lmax)
    rmin = min(r,rmin)

print(max(rmin - lmax + 1,0))
Buggy python submission (verdict: Runtime Error):
a,b.c = map(int,input().split())
if a < c < b or a > c > b:
    print("OK")
else:
    print("NO")


Fixed submission:
a, b, c = map(int,input().split())
if a > c > b or b > c > a :
  print('Yes')
else :
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b.c = map(int,input().split())
if a < b:
  if c < b:
    print("OK")
  else:
    print("NO")
else:
  if c < a:
    print("OK")
  else:
    print("NO")

Fixed submission:
a, b, c = map(int,input().split())
if a > c > b or b > c > a :
  print('Yes')
else :
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b.c =map(int,input().split())
if a<b:
  if c<b:
    print("OK")
  else:
    print("NO")
else:
  if c<a:
    print("OK")
  else:
    print("NO")


Fixed submission:
a, b, c = map(int,input().split())
if a > c > b or b > c > a :
  print('Yes')
else :
  print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
k=int(input())
for i in s:
  if i == s[k]:
  else:
    s = s.replace(i,'*')


Fixed submission:
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  if i == s[k-1]:
    num +=1
  else:
    s = s.replace(s[num],'*')
    num +=1
print(s)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  if i == s[k]:
    num +=1
  else:
    s = s.replace(i,'*')
    num +=1

Fixed submission:
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  if i == s[k-1]:
    num +=1
  else:
    s = s.replace(s[num],'*')
    num +=1
print(s)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  print(i)
  if i == s[k]:
    num +=1
  else:
    s = s.replace(i,'*')
    num +=1

Fixed submission:
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  if i == s[k-1]:
    num +=1
  else:
    s = s.replace(s[num],'*')
    num +=1
print(s)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  print(i)
  if i == s[k]:
    num +=1
  else:
    s = s.replace(s[num],'*')
    num +=1

Fixed submission:
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  if i == s[k-1]:
    num +=1
  else:
    s = s.replace(s[num],'*')
    num +=1
print(s)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
sum=0
if a >= b:
    sum += a
    a -= 1
    if a >= b:
        sum += a
    else:
        sum += b
else:
    sum += b
	b -=1
    if a < b:
        sum += b
    else:
        sum +=a
print(sum)


Fixed submission:
a, b = map(int, input().split())
sum=0
if a >= b:
    sum += a
    a -= 1
    if a >= b:
        sum += a
    else:
        sum += b
else:
    sum += b
    b -=1
    if a < b:
        sum += b
    else:
        sum +=a
print(sum)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
sum=0
if a >= b:
    sum += a
    a -= 1
    if a >= b:
        sum += a
    else:
        sum += b
else:
    sum += b
    if a < b:
        sum += b
    else:
        sum +=a
print(sum)

Fixed submission:
a, b = map(int, input().split())
sum=0
if a >= b:
    sum += a
    a -= 1
    if a >= b:
        sum += a
    else:
        sum += b
else:
    sum += b
    b -=1
    if a < b:
        sum += b
    else:
        sum +=a
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

Fixed submission:
a=int(input())
List=list(map(int,input().split()))
c = 0

for i in range(a):
    if max(List[:i+1]) == List[i]:
        c +=1
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

Fixed submission:
a=int(input())
List=list(map(int,input().split()))
c = 0

for i in range(a):
    if max(List[:i+1]) == List[i]:
        c +=1
print(c)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())

if e - a <=  f:
  print('Yay!')
else
  print(':(')

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())

if e - a <=  f:
  print('Yay!')
else:
  print(':(')

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())

if e - a =<  f:
  print('Yay!')
else
  print(':(')

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())

if e - a <=  f:
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
a = int(input()) 

if a == 'A' or a =='T':
  if a == 'A':
    print('T')
  else:
    print('A')
else:
  if a == 'G':
    print('C')
  else:
    print('G')

Fixed submission:
a = input()

if a == 'A' or a =='T':
  if a == 'A':
    print('T')
  else:
    print('A')
else:
  if a == 'G':
    print('C')
  else:
    print('G')
Buggy python submission (verdict: Runtime Error):
a = int(input().split("/"))
if a[1] <= 4:
    print('Heisei')
else:
    print('TBD')


Fixed submission:
S = input().split("/")
if int(S[1]) < 5:
    print("Heisei")
else:
    print("TBD")

Buggy python submission (verdict: Runtime Error):
a = input().split("/")
if a[1] <= 4:
    print('Heisei')
else:
    print('TBD')


Fixed submission:
S = input().split("/")
if int(S[1]) < 5:
    print("Heisei")
else:
    print("TBD")

Buggy python submission (verdict: Runtime Error):
a = input().split("/")
print(a)
if a[1] <= 4:
    print('Heisei')
else:
    print('TBD')


Fixed submission:
S = input().split("/")
if int(S[1]) < 5:
    print("Heisei")
else:
    print("TBD")
Buggy python submission (verdict: Runtime Error):
a = int(input())
A=[]
for i in range(a):
  array = input().split(' ')
  A.append(array)

sum=0
for j in A:
  if j[1]=='JPY':
    sum += int(j[0])
  else:
    sum += int(j[0])*380000
print(sum)

Fixed submission:
a = int(input())
A=[]
for i in range(a):
  array = input().split(' ')
  A.append(array)

sum=0
for j in A:
  if j[1]=='JPY':
    sum += int(j[0])
  else:
    sum += float(j[0])*380000
print(sum)
Buggy python submission (verdict: Runtime Error):
a, b = map(int(input().split()))
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Fixed submission:
a, b = map(int, input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)