Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys

args = sys.argv

if int(args[1]) == 0:
	result = 0
elif 13 > int(args[1]):
	result = int(args[2])/2
else:
	result = args[2]

print(result)

Fixed submission:
import sys

a, b = map(int, input().split())

if 6 > a:
	b = 0
elif 13 > a:
	b = b/2

print(int(b))

Buggy python submission (verdict: Runtime Error):
import sys

args = sys.argv

if int(args[1]) == 0:
	result = 0
elif 13 > int(args[1]):
	result = int(args[2])/2
else:
	result = args[2]

print(result)

Fixed submission:
import sys

a, b = map(int, input().split())

if 6 > a:
	b = 0
elif 13 > a:
	b = b/2

print(int(b))
Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
it=int(-1)
sum=int(0)
for i in s:
    if i == '1':
        sum+=1
    else:
        it=i

if k<=int(it):
    print(1)
elif it == int(-1):
    print(1)
else:
    print(s[it])

Fixed submission:
s=input()
k=int(input())
it=int(-1)
sum=int(0)
for i in s:
    if i == '1':
        sum+=1
    else:
        it=sum
        break

if k<=int(it):
    print(1)
elif it == int(-1):
    print(1)
else:
    nex=int(it)+int(1)
    print(s[it:nex])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
it=int(-1)
sum=int(0)
for i in s:
    if i == '1':
        sum+=1
    else:
        it=i

if k<=it:
    print(1)
elif it is -1:
    print(1)
else:
    print(s[it])

Fixed submission:
s=input()
k=int(input())
it=int(-1)
sum=int(0)
for i in s:
    if i == '1':
        sum+=1
    else:
        it=sum
        break

if k<=int(it):
    print(1)
elif it == int(-1):
    print(1)
else:
    nex=int(it)+int(1)
    print(s[it:nex])
Buggy python submission (verdict: Runtime Error):
s=input()
print("ABC"+f"{s}")


Fixed submission:
s=input()
print("ABC"+s)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
l = list()
r = list()
for i in range(m):
    a, b = map(int, input().split())
    l.append(a)
    r.append(b)

ans = 0

for j in range(n):
    flag = 1
    for k in range(m):
        if j < l[k]-1 or j > r[k]-1:
            flag = 0
            break
    if flag == 1:
        ans += 1

print(ans)

Fixed submission:
n, m = map(int, input().split())
l = list()
r = list()
for i in range(m):
    a, b = map(int, input().split())
    l.append(a)
    r.append(b)

if min(r) >= max(l):
    print(min(r) - max(l) + 1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
l = list()
r = list()
for i in range(m):
    a, b = map(int, input().split())
    l.append(a)
    r.append(b)

ans = 0

for j in range(n):
    flag = 1
    for k in range(m):
        if j < l[k]-1 or j > r[k]-1:
            flag = 0
    if flag == 1:
        ans += 1

print(ans)

Fixed submission:
n, m = map(int, input().split())
l = list()
r = list()
for i in range(m):
    a, b = map(int, input().split())
    l.append(a)
    r.append(b)

if min(r) >= max(l):
    print(min(r) - max(l) + 1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
k = int(input())
c = s[k-1]
i = s.find(c)
s2 = "*"*n
for n in i:
	s2[n] = c
print(s2)


Fixed submission:
n = int(input())
s = input()
k = int(input())
c = s[k-1]
s2 = ""
for m in range(n):
	if s[m] == c:
		s2 += c
	else:
		s2 += '*'
        
print(str(s2))

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
k = int(input())
c = s[k-1]
i = s.find(c)
s2 = "*"*n
s2[i] = c
print(s2)


Fixed submission:
n = int(input())
s = input()
k = int(input())
c = s[k-1]
s2 = ""
for m in range(n):
	if s[m] == c:
		s2 += c
	else:
		s2 += '*'
        
print(str(s2))
Buggy python submission (verdict: Runtime Error):
l = [0]*100000
n = int(raw_input())
for x in xrange(n):
	a = map(int,raw_input().strip().split())
	for y in xrange(a[0],a[1]+1):
		l[y] = 1
ans = 0
for x in l:
	if x == 1:
		ans += 1
print(ans)

Fixed submission:
l = [0]*100005
n = int(raw_input())
for x in xrange(n):
	a = map(int,raw_input().strip().split())
	for y in xrange(a[0],a[1]+1):
		l[y] = 1
ans = 0
for x in l:
	if x == 1:
		ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def lcm(a,b):
	if(a>b):
	    min1=a
	else:
	    min1=b
	while(1):
	    if(min1%a==0 and min1%b==0):
	        return min1
	    min1=min1+1
l = []
for x in range(int(raw_input())):
	l.append(int(raw_input()))
ans = 1
for x in l:
	ans = lcm(ans,x)
print(ans)

Fixed submission:
def gcd(*numbers):
    """Return the greatest common divisor of the given integers"""
    from fractions import gcd
    return reduce(gcd, numbers)

# Least common multiple is not in standard libraries? It's in gmpy, but this is simple enough:

def lcm(*numbers):
    """Return lowest common multiple."""    
    def lcm(a, b):
        return (a * b) // gcd(a, b)
    return reduce(lcm, numbers, 1)
l = []
for x in range(int(raw_input())):
	l.append(int(raw_input()))
ans = 1
for x in l:
	ans = lcm(ans,x)
print(ans)
Buggy python submission (verdict: Runtime Error):
a = map(int, raw_input().strip().split())
sort(a)
if a[0] == 5 and a[1] == 5 and a[2] == 7:
	print('YES')
else:
	print("NO")

Fixed submission:
a = map(int, raw_input().strip().split())
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7:
	print('YES')
else:
	print("NO")
Buggy python submission (verdict: Runtime Error):
a, b =map(int, open(0).read().split())
if a < b:
  c = 2 * b - 1
  print(c)
if a == b:
  c = 2 * a
  print(c)
else:
  c = 2 * a -1
  print(c)

Fixed submission:
a, b, c =map(int, open(0).read().split())
if a == b and b == c:
  print(1)
elif a == b or b == c or a == c:
  print(2)
else:
  print(3)
Buggy python submission (verdict: Runtime Error):
from sys import stdin


def sortFirst(val):
    return val[0]
N=stdin.readline().rstrip()
N=int(N)
l={}
for i in range(1,N+1):
    S,P = stdin.readline().rstrip().split()
    if S in l.keys():
        l[S].append([int(P),i])

    else:
        l[S]=[[int(P),i]]


for key in l.keys():
    l[key].sort(key=sortFirst,reverse=True)
for key in sorted(l):
    for val in l[key]:
        print "%d"%(val[1])


Fixed submission:
from sys import stdin


def sortFirst(val):
    return val[0]
N=stdin.readline().rstrip()
N=int(N)
l={}
for i in range(1,N+1):
    S,P = stdin.readline().rstrip().split()
    if S in l.keys():
        l[S].append([int(P),i])

    else:
        l[S]=[[int(P),i]]


for key in l.keys():
    l[key].sort(key=sortFirst,reverse=True)
for key in sorted(l):
    for val in l[key]:
        print(val[1])

Buggy python submission (verdict: Runtime Error):
import collections
def sortFirst(val):
    return val[0]
N=raw_input("")
N=int(N)
l={}
for i in range(1,N+1):
    S,P = raw_input("").split(' ')
    if S in l.keys():
        l[S].append([int(P),i])

    else:
        l[S]=[[int(P),i]]


for key in l.keys():
    l[key].sort(key=sortFirst,reverse=True)
for key in sorted(l):
    for val in l[key]:
        print "%d"%(val[1])


Fixed submission:
from sys import stdin


def sortFirst(val):
    return val[0]
N=stdin.readline().rstrip()
N=int(N)
l={}
for i in range(1,N+1):
    S,P = stdin.readline().rstrip().split()
    if S in l.keys():
        l[S].append([int(P),i])

    else:
        l[S]=[[int(P),i]]


for key in l.keys():
    l[key].sort(key=sortFirst,reverse=True)
for key in sorted(l):
    for val in l[key]:
        print(val[1])
Buggy python submission (verdict: Runtime Error):
A = int(input())
P = int(input())
print( (A*3+P)//2 )


Fixed submission:
S = input()
A,P = S.split(' ')
print( (int(A)*3+int(P))//2 )
Buggy python submission (verdict: Runtime Error):
fl = input()
sl = input()

koma_num, pos_num = [int (x) for x in fl.split(" ")]
poses = [int(x) for x in sl.split(" ")]
poses.sort()

if koma_num >= pos_num:
    print("0")

dists = []
total = 0
for n in range(pos_num-1):
    dist = poses[n+1] - poses[n]
    dists.append(dist)
    total += dist

dists.sort()
dists.reverse()

for n in range(koma_num-1):
    total -= dists[n]

print(total)


Fixed submission:
fl = input()
sl = input()

koma_num, pos_num = [int (x) for x in fl.split(" ")]
poses = [int(x) for x in sl.split(" ")]
poses.sort()

if koma_num >= pos_num:
    print("0")
    exit()

dists = []
total = 0
for n in range(pos_num-1):
    dist = poses[n+1] - poses[n]
    dists.append(dist)
    total += dist

dists.sort()
dists.reverse()

if(len(dists) == 0):
    print("0")
    exit()

for n in range(koma_num-1):
    total -= dists[n]

print(total)

Buggy python submission (verdict: Runtime Error):
fl = input()
sl = input()

koma_num, pos_num = [int (x) for x in fl.split(" ")]
poses = [int(x) for x in sl.split(" ")]
poses.sort()

dists = []
total = 0
for n in range(pos_num-1):
    dist = poses[n+1] - poses[n]
    dists.append(dist)
    total += dist

dists.sort()
dists.reverse()

for n in range(koma_num-1):
    total -= dists[n]

print(total)


Fixed submission:
fl = input()
sl = input()

koma_num, pos_num = [int (x) for x in fl.split(" ")]
poses = [int(x) for x in sl.split(" ")]
poses.sort()

if koma_num >= pos_num:
    print("0")
    exit()

dists = []
total = 0
for n in range(pos_num-1):
    dist = poses[n+1] - poses[n]
    dists.append(dist)
    total += dist

dists.sort()
dists.reverse()

if(len(dists) == 0):
    print("0")
    exit()

for n in range(koma_num-1):
    total -= dists[n]

print(total)

Buggy python submission (verdict: Runtime Error):
fl = input()
sl = input()

koma_num, pos_num = [int (x) for x in fl.split(" ")]
poses = [int(x) for x in sl.split(" ")]
poses.sort()

dists = []
total = 0
for n in range(pos_num-1):
    dists.append(abs(poses[n+1] - poses[n]))
    total += poses[n+1] - poses[n]

dists.sort()
dists.reverse()

for n in range(koma_num-1):
    total -= dists[n]

print(total)


Fixed submission:
fl = input()
sl = input()

koma_num, pos_num = [int (x) for x in fl.split(" ")]
poses = [int(x) for x in sl.split(" ")]
poses.sort()

if koma_num >= pos_num:
    print("0")
    exit()

dists = []
total = 0
for n in range(pos_num-1):
    dist = poses[n+1] - poses[n]
    dists.append(dist)
    total += dist

dists.sort()
dists.reverse()

if(len(dists) == 0):
    print("0")
    exit()

for n in range(koma_num-1):
    total -= dists[n]

print(total)
Buggy python submission (verdict: Runtime Error):
a, b = int(input().toString().split(" "))

print(abs((a-2)*(b-2)))

Fixed submission:
a, b = [int(x) for x in input().split(" ")]
print(abs((a-2)*(b-2)))
Buggy python submission (verdict: Runtime Error):
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))


n = int(input())
ans = 0
for _ in range(n):
    x, u == map(str, input().split())
    if u == "JPY":
        ans += int(x)
    else:
        ans += int(x)*380000.0
print(ans)


Fixed submission:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))


N = int(input())

sum = 0
for _ in range(N):
    x, u = input().split()
    if u == 'JPY':
        sum += float(x)
    else:
        sum += float(x) * 380000.0

print(sum)
Buggy python submission (verdict: Runtime Error):
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a,b=map(int,input().splpit())
print(a+int(b/2))

Fixed submission:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a,b=map(int,input().split())
print(a+int(b/2))
Buggy python submission (verdict: Runtime Error):
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a, b ,c,d= map(int, input().split())
if abs(a,c)<=d or abs(a,b)<=d and abs(b,c)<=d:
    print("Yes")
else:
    print("No")

Fixed submission:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a, b, c, d = map(int, input().split())
if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a, b, c = map(str, input().split())
e,f,g = map(str, input().split())
if a==g and b==f and c==e:
    print("YES")
else:
    print("NO")

Fixed submission:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a=str(input())
b=str(input())

if a[0] == b[-1] and a[1] == b[-2] and a[2] == b[-3]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a, b, c = map(int, input().split())
e,f,g = map(int, input().split())
if a==g and b==f and c==e:
    print("YES")
else:
    print("NO")

Fixed submission:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a=str(input())
b=str(input())

if a[0] == b[-1] and a[1] == b[-2] and a[2] == b[-3]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a = str(input())
if a[0]=a[-1]:
    print("Yes")
else:
    print("No")

Fixed submission:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a = str(input())
if a[0] == a[-1]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = str(input())
for i in {"a", "i", "u", "e", "o"}:
    if a == i:
        flag = 1
        print("vowel")
if flag == 0:
    print("consonant")

Fixed submission:
a = str(input())
flag = 0
for i in {"a", "i", "u", "e", "o"}:
    if a == i:
        flag = 1
        print("vowel")
if flag == 0:
    print("consonant")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == b and b == c:
    print(1)
elif a == b and b != c or b == c and a != b or a==c and a!=b
    print(2)
else:
    print(3)

Fixed submission:
a, b, c = map(int, input().split())
if a == b and b == c:
    print(1)
elif a == b and b != c or b == c and a != b or a==c and a!=b:
    print(2)
else:
    print(3)
Buggy python submission (verdict: Runtime Error):
import re

s = input()

regex = re.compile('[ACGT]+')

l = 0

for i in range(len(s)):
    r1 = regex.match(s[:i])
    r2 = regex.match(s[i:])
    if r1 and r1[0]:
        l = max(l, len(r1[0]))
    if r2 and r2[0]:
        l = max(l, len(r2[0]))

print(l)


Fixed submission:
s = input()

max_count = 0
count = 0

for i in s:
    if i not in ['A', 'C', 'G', 'T']:
        count = 0
        continue
    count += 1
    max_count = max(max_count, count)

print(max_count)

Buggy python submission (verdict: Runtime Error):
import re

s = input()

regex = re.compile('[ACGT]+')

l = 0

for i in range(len(s)):
    r1 = regex.match(s[:i])
    r2 = regex.match(s[i:])
    if r1:
        l = max(l, len(r1[0]))
    if r2:
        l = max(l, len(r2[0]))

print(l)


Fixed submission:
s = input()

max_count = 0
count = 0

for i in s:
    if i not in ['A', 'C', 'G', 'T']:
        count = 0
        continue
    count += 1
    max_count = max(max_count, count)

print(max_count)

Buggy python submission (verdict: Runtime Error):
import re

s = input()

regex = re.compile('[ACGT]+')

l = 0

for i in range(len(s)):
    r = regex.match(s[i:])
    if r:
        l = max(l, len(r[0]))

print(l)


Fixed submission:
s = input()

max_count = 0
count = 0

for i in s:
    if i not in ['A', 'C', 'G', 'T']:
        count = 0
        continue
    count += 1
    max_count = max(max_count, count)

print(max_count)
Buggy python submission (verdict: Time Limit Exceeded):
import re

_, Q = [int(x) for x in input().split()]
S = input()
ac = re.compile('AC')

results = []
for i in range(Q):
    l, r = [int(x) for x in input().split()]
    target = S[l-1:r]
    c = 0
    for j in range(len(target)-1):
        if target[j:j+2] == 'AC':
            c += 1
    results.append(c)

for i in results:
    print(i)


Fixed submission:
N, Q = [int(x) for x in input().split()]
S = input()

t = [0] * (N + 1)

for i in range(N):
    if S[i:i+2] == 'AC':
        t[i+1] = t[i] + 1
    else:
        t[i+1] = t[i]

for i in range(Q):
    l, r = [int(x) for x in input().split()]
    print(t[r-1] - t[l-1])

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

_, Q = [int(x) for x in input().split()]
S = input()
ac = re.compile('AC')

results = []
for i in range(Q):
    l, r = [int(x) for x in input().split()]
    target = S[l-1:r]
    results.append(len(ac.findall(target)))

for i in results:
    print(i)


Fixed submission:
N, Q = [int(x) for x in input().split()]
S = input()

t = [0] * (N + 1)

for i in range(N):
    if S[i:i+2] == 'AC':
        t[i+1] = t[i] + 1
    else:
        t[i+1] = t[i]

for i in range(Q):
    l, r = [int(x) for x in input().split()]
    print(t[r-1] - t[l-1])
Buggy python submission (verdict: Runtime Error):
def handPop(hand):
    min_val = hand.pop(hand.index(min(hand)))
    return hand, min_val

N, K = map(int, input().split())
V = list(map(int, input().split()))
hand = []
ps = []
def func(V, hand, K):
    if K < 1:
        ps.append(hand)
        return
    if len(hand) > 0 and min(hand) < 0:
        hand_ = hand[:]
        hand_, min_val = handPop(hand_)
        C = func([min_val] + V, hand_, K-1)
        D = func(V + [min_val], hand_, K-1)
        A = func(V[1:], hand+[V[0]], K-1)
        B = func(V[:-1], hand+[V[-1]], K-1)
    else:
        A = func(V[1:], hand+[V[0]], K-1)
        B = func(V[:-1], hand+[V[-1]], K-1)

    
func(V, hand, K)
v_max = max([sum(x) for x in ps])
print(v_max if v_max > 0 else 0)

Fixed submission:
N, K = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for L in range(min(N, K+1)):
    for R in range(min(N-L, K-L)+1):
        js = V[:L] + V[-R:] if R > 0 else V[:L]
        t = K - L - R
        s = 0
        for i in sorted(js):
            if i < 0 and t > 0:
                s += -i
                t -= 1
        ans = max(ans, sum(js) + s)
print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
V = list(map(int, input().split()))
hand = []
ps = []
def func(V, hand, K):
    if K < 1:
        ps.append(hand)
        return
    if len(hand) > 0 and min(hand) < 0:
        hand_ = hand[:]
        hand_, min_val = handPop(hand_)
        C = func([min_val] + V, hand_, K-1)
        D = func(V + [min_val], hand_, K-1)
        A = func(V[1:], hand+[V[0]], K-1)
        B = func(V[:-1], hand+[V[-1]], K-1)
    else:
        A = func(V[1:], hand+[V[0]], K-1)
        B = func(V[:-1], hand+[V[-1]], K-1)

    
func(V, hand, K)
v_max = max([sum(x) for x in ps])
print(v_max if v_max > 0 else 0)

Fixed submission:
N, K = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for L in range(min(N, K+1)):
    for R in range(min(N-L, K-L)+1):
        js = V[:L] + V[-R:] if R > 0 else V[:L]
        t = K - L - R
        s = 0
        for i in sorted(js):
            if i < 0 and t > 0:
                s += -i
                t -= 1
        ans = max(ans, sum(js) + s)
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B,C = map(int,input().split())
if A<C & C<B:
	print("yes")
else:
  if A>C & C>B:
    print("yes")
  else:
	print("No")


Fixed submission:
A,B,C = map(int,input().split())
if A>C & C>B:
	print("Yes")
if B>C & C>A:
   	print("Yes")
if C>A & A>B:
	print("No")
if B>A & A>C:
	print("No")
if A>B & B>C:
	print("No")
if C>B & B>A:
	print("No")
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
K=int(input())
Slist =list(S)
for i in range(N):
	if Slist[K] == Slist[i]:
		continue
	else:
		Slist[i]="*"
S = ''.join(Slist)
print(S)

Fixed submission:
N=int(input())
S=input()
K=int(input())
Slist =list(S)
for i in range(N):
	if Slist[K-1] == Slist[i]:
		continue
	else:
		Slist[i]="*"
S = ''.join(Slist)
print(S)
Buggy python submission (verdict: Runtime Error):
def pie(A, P):
    P_cra = A*3
 
    P_all = P_cra + P
 
    pie = P_all//2
 
    print(pie)

A = input()
P = input()
pie(int(A), int(P))

Fixed submission:
def pie(A, P):
    P_cra = A*3
 
    P_all = P_cra + P
 
    pie = P_all//2
 
    print(pie)

l = list(map(int, input().split()))
A = int(l[0])
P = int(l[1])
pie(A, P)

Buggy python submission (verdict: Runtime Error):
def pie(A, P):
    P_cra = A*3

    P_all = P_cra + P

    pie = P_all//2

    print(pie)

A, P = input(), input()
pie(A, P)
    

Fixed submission:
def pie(A, P):
    P_cra = A*3
 
    P_all = P_cra + P
 
    pie = P_all//2
 
    print(pie)

l = list(map(int, input().split()))
A = int(l[0])
P = int(l[1])
pie(A, P)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A_dict = {}
B_dict = {}
i = 0
flg = 0
while i < N:
    l = list(map(int, input().split()))
    A = l[0]
    B = l[1]
    A_dict[str(i)] = A
    B_dict[str(i)] = B
    if flg == 0 and A != B:
        flg = 1
    i+=1

taka = 0
aoki = 0
for i in range(N):
    if flg == 0:
        A_max_key = max(A_dict, key=A_dict.get)
        taka += A_dict[str(A_max_key)]

        if len(A_dict) != 0:
            A_dict.pop(A_max_key)
        if len(B_dict) != 0:
            B_dict.pop(A_max_key)
        if len(B_dict) == 0:
            break

        B_max_key = max(B_dict, key=B_dict.get)
        aoki += max(B_dict.values())

        if len(A_dict) != 0:
            A_dict.pop(B_max_key)
        if len(B_dict) != 0:
            B_dict.pop(B_max_key)
        if len(A_dict) == 0:
            break
    else:
        B_max_key = max(B_dict, key=B_dict.get)
        taka += A_dict[B_max_key]

        if len(A_dict) != 0:
            A_dict.pop(B_max_key)
        if len(B_dict) != 0:
            B_dict.pop(B_max_key)
        if len(B_dict) == 0:
            break

        B_max_key = max(B_dict, key=B_dict.get)
        aoki += max(B_dict.values())

        if len(A_dict) != 0:
            A_dict.pop(B_max_key)
        if len(B_dict) != 0:
            B_dict.pop(B_max_key)
        if len(B_dict) == 0:
            break

print(taka, aoki)


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

N = l[0]
x = l[1]
y = l[2]

if N > x + y:
    b_min = 0
else:
    b_min = (x + y) - N

if x > y:
    b_max = y
else:
    b_max = x

if N == x and N == y:
    b_min = N
    b_max = N

print(b_max, b_min)