Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02912 (python)

Fixed submission:
N,M = map(int,input().split())
lis = list(map(lambda x: -int(x),input().split()))

import heapq
heapq.heapify(lis)
for _ in range(M):
    tmp = -heapq.heappop(lis)
    tmp //= 2
    heapq.heappush(lis,-tmp)

print(-sum(lis))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input()split())
lis = list(map(lambda x: -int(x),input().split()))

import heapq
heapq.heapify(lis)
for _ in range(M):
    tmp = -heapq.heappop(lis)
    tmp //= 2
    heapq.heappush(lis,-tmp)

print(-sum(lis))
Problem p03208 (python)

Fixed submission:
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs.append(h[i+k-1] - h[i])
print(min(diffs))

Buggy submission (verdict: Runtime Error):
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs.append(h[i+k] - h[i])
print(min(diffs))

Buggy submission (verdict: Runtime Error):
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs = h[i+k] - h[i]
print(min(diffs))
Problem p02753 (python)

Fixed submission:
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline().strip()

if S == "AAA" or S == "BBB":
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline()

if S == 'AAA' or S == 'BBB':
    print("No")
else
    print("Yes")

Buggy submission (verdict: Runtime Error):
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline()

if S == 'AAA' or S == 'BBB':
    return False
else
    return True
Problem p02754 (python)

Fixed submission:
import sys

read = sys.stdin.readline
T = read()
a, b, c = map(int, T.split())

temp = a // (b+c)
answer = temp * b
temp2 = a % (b+c)

if temp2 >= b:
    answer += b
else:
    answer += temp2

print(answer)

Buggy submission (verdict: Runtime Error):
import sys

read = sys.stdin.readline
T = read()
a, b, c = map(int, T.split())

if b == 0:
    print(0)
else if b == 8:
    print(8)
else:
    print(a-c)
Problem p02777 (python)

Fixed submission:
s = input().split()
a = list(map(int, input().split()))
u = input()

if u == s[0]:
    print(a[0]-1, a[1])
else:
    print(a[0], a[1]-1)

Buggy submission (verdict: Runtime Error):
s = intput().split()
a = list(map(int, input().split()))
u = input()

if u == s[0]:
    print(a[0]-1, a[1])
else:
    print(a[0], a[1]-1)
Problem p02832 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
	if a[i]-1 == count:
		count += 1
if count == 0:
	print('-1')
else:
	print(n-count)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
	if a[i]-1 == count:
		count += 1
if count == 0:
	print(-1)
else:
	prin
	t(n-count)
Problem p02916 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

tmp = -1
sum = 0
for i in range(n):
    sum += b[i]
    if a[i] == tmp + 1:
        sum += c[tmp-1]
    tmp = a[i]
print(sum)

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

tmp = -1
sum = 0
for i in range(n):
    sum += b[i]
    if a[i] == tmp + 1:
        sum += c[i]
    tmp = a[i]
print(sum)
Problem p02753 (python)

Fixed submission:
s=input()

if('A' in s and 'B' in s):
    print("Yes")
else :
    print("No")

Buggy submission (verdict: Runtime Error):
li = input().split()

N=int(li[0])
A=int(li[1])
B=int(li[2])

def firstcheck():
    sum=A+B
    count=A
    if(A>=N or A+B>=N):
        return A

    while True:
        if(i%2==0):
            sum+=A
            if(sum>=N):
                count+=(A-(sum-N))
                return count
            else:
                count+=A
                continue
        else:
            sum+=B
            if(sum>=N):
                return count


res=firstcheck()
print(res)
Problem p02754 (python)

Fixed submission:
# coding: utf-8

n, b, r = map(int, input().split())

x = n // (b + r)

if n % (b + r) > b:
    print(x * b + b)
   
else:
    print((x * b) + (n % (b + r)))

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

def main()
  n, b, r = map(int, input().split())

  x = n // (b + r)

  if n % (b + r) > b:
      print(x * b + b)

  else:
      print((x * b) + (n % (b + r)))
      

if __name__ == '__main__':
    main()
Problem p02773 (python)

Fixed submission:
# coding: utf-8


def main():
    n = int(input())
    polls_dict = {}
    for _ in range(n):
        poll = input()
        if poll not in polls_dict:
            polls_dict[poll] = 1
        else:
            polls_dict[poll] += 1

    max_poll = max(polls_dict.values())
    
    polls_set = set()
    for key, value in polls_dict.items():
        if value == max_poll:
            polls_set.add(key)

    polls_set = sorted(polls_set)
    for poll in polls_set:
        print(poll)
    
    return 0


if __name__ == '__main__':
    main()

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


def main():
    n = int(input())
    polls_dict = {}
    for _ in range(n):
        poll = input()
        if poll not in polls_dict:
            polls_dict[poll] = 1
        else:
            polls_dict[poll] += 1

    max_poll = max(polls_dict.values())
    #polls_set = sorted(polls_dict.keys())
    polls_dict = sorted(polls_dict)

    for key, value in polls_dict.items():
        if value == max_poll:
            print(key)
        else:
            pass

    #for poll in polls_set:
    #    print(poll)
    
    return 0


if __name__ == '__main__':
    main()
Problem p02819 (python)

Fixed submission:
# coding: utf-8
import math


def isprime(target):

    dest = int(math.sqrt(target))
    for i in range(2, dest):
        if target % i == 0:
            return False
    return True


def main():

    i = int(input())

    while True:
        if isprime(i):
            print(i)
            break
        else:
            i += 1

    return 0

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# coding: utf-8
from sympy import isprime
from sympy import nextprime


def main():
    
    input_ = int(input())
    
    if isprime(input_):
        print(input_)
    else:
        print(nextprime(input_))

    return 0
    

if __name__ == '__main__':
    main()
Problem p02771 (python)

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

if (A==B==C or  A!=C and A!=B and B!=C):
  print("No")

else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())

if (A==B==C or  A!=C and B !=C):
  print("No")

else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
A = input ()
B = input ()
C = input ()

if (A==B and A!=C or B==C and B!=A or A==C and A!=B ):
  print("Yes")
  
else:
  print("No")
Problem p03041 (python)

Fixed submission:
l = input().split()
N = int(l[0])
K = int(l[1])
S = str(input())

s_up = list(S)
s_up [K-1] = s_up[K-1].lower()

for n in range(N):
    print(s_up[n], end='')

print()

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
S = str(input())

s_up = list(S)
s_low = s_up[K-1].lower()
s_up [K-1] = s_low

for n in range(N):
    print(s_up[n], end='')

print()
Problem p02753 (python)

Fixed submission:
S = input()
if S == 'AAA' or S == 'BBB' :
    print('No')
else :
    print('Yes')

Buggy submission (verdict: Runtime Error):
N, A, B = map(int,input().split())

if A == 0 :
    print(0)

elif N >A+B :
    q, mod = divmod(N, A+B)
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    q, mod = divmod(N, A+B)
    print(q*A)

elif N < A+B :
    print(N)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int,input().split())

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A+B :
    print(N)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int,input().split())

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A or N < A+B :
    print(N)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int,input().split())

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A or N < A+B :
    print(N)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int,input().split())

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A+B :
    print(N)
    
elif N < A :
    print(N)
Problem p02847 (python)

Fixed submission:
S = input()
week_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - week_list.index(S))

Buggy submission (verdict: Runtime Error):
S = input()
week_list = ["SUN", "MON", "TUE", "WED", "THE", "FRI", "SAT"]
print(7 - week_list.index(S))
Problem p03011 (python)

Fixed submission:
P, Q, R = map(int, input().split())

times = []
times.append(P+Q)
times.append(P+R)
times.append(Q+R)

print(min(times))

Buggy submission (verdict: Runtime Error):
P, Q, R = int(input()), int(input()), int(input())

if P < Q < R:
    t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)

Buggy submission (verdict: Runtime Error):
P = int(input())
Q = int(input())
R = int(input())

if P < Q < R:
    t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)

Buggy submission (verdict: Runtime Error):
P = int(input())
Q = int(input())
R = int(input())

if P < Q < R:
	t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)

Buggy submission (verdict: Runtime Error):
P = int(input())
Q = int(input())
R = int(input())

if P < Q < R:
	t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)
Problem p03041 (python)

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

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

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = input()

print(s[:k] + s[k].lower() + s[k+1:])
Problem p02753 (python)

Fixed submission:
S = input()
if len(set(S)) != 2:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
if len(set(S)) != 2:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
if S[0] == S[1] and S[1] == S[2]:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):

if S == "AAA" or S == "BBB":
    print("NO")
else:
    print("YES")
Problem p02832 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	if a[0] == 1:
		print (0)
		exit()
	else:
		print (-1)
		exit()
if len(set(a)) == 1 and a[0] != 1:
	print (-1)
	exit()
 
x = 1
cnt = 0
for i in a:
	if i == x:
		x += 1
	else:
		cnt += 1
if cnt == n:
	print (-1)
else:
	print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
if len(set(a)) == 1:
    if list(set(a)[0]) != 1:
        print(-1)
        exit()
    else:
        print(0)
        exit()

x = 1
count = 0
for i in a:
    if i == x:
        x+=1
    else:
        count+=1
if count == n:
    print(-1)
else:
    print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
if len(set(a)) == 1:
    if set(a)[0] != 1:
        print(-1)
        exit()
    else:
        print(0)
        exit()

x = 1
count = 0
for i in a:
    if i == x:
        x+=1
    else:
        count+=1
if count == n:
    print(-1)
else:
    print(count)

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

if len(set(a)) == 1:
    if set(a)[0] != 1:
        print(-1)
        exit()
    else:
        print(0)
        exit()

x = 1
count = 0

for i in a:
    if i == x:
        x+=1
    else:
        count+=1

print(count)

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

if len(set(a)) == 1:
    if set(a)[0] != 1:
        print(-1)
        exit()
    else:
        print(0)
        exit()

x = 1
count = 0

for i in a:
    if i == x:
        x+=1
    else:
        count+=1

print(count)
Problem p02753 (python)

Fixed submission:
S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==2:
    print('Yes')

else:
    print('No')

Buggy submission (verdict: Runtime Error):
S = input()
if len(S) == 3 and S.count('A')==2 or S.count('B')==2:
  print('Yes')
  else:
    print('No')
Problem p02771 (python)

Fixed submission:
print("Yes") if len(set(list(map(int, input().split(" ")))))==2 else print("No")

Buggy submission (verdict: Runtime Error):
n = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) ==len(answer):
    print("APPROVED")
else:
    print("DENIED")

Buggy submission (verdict: Runtime Error):
n = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) ==len(answer):
    print("APPROVED")
else:
    print("DENIED")

Buggy submission (verdict: Runtime Error):
n = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) ==len(answer):
    print("APPROVED")
else:
    print("DENIED")
Problem p02773 (python)

Fixed submission:
def main():
    n = int(input())
    s = {}
    for _ in range(n):
        string = input()
        if string in s:
            s[string] += 1
        else:
            s[string] = 1
    s = sorted(list(s.items()), key=lambda x: (x[1], x[0]), reverse=True)
    lst = []
    max_num = s[0][1]
    if n == len(s):
        for string, num in reversed(s):
            print(string)
    else:
        for string, num in s:
            if num != max_num:
                break
            lst.append(string)
    for l in reversed(lst):
        print(l)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    n = int(input())
    s = {}
    for _ in range(n):
        string = input()
        if string in s:
            s[string] += 1
        else:
            s[string] = 1
    s = sorted(list(s.items()), key=lambda x: (x[1], x[0]), reverse=True)
    lst = []
    max_num = s[0][1]
    if n == len(s):
        print(s.items()[0])
        return
    for string, num in s:
        if num != max_num:
            break
        lst.append(string)
    for l in reversed(lst):
        print(l)


if __name__ == "__main__":
    main()
Problem p02790 (python)

Fixed submission:
M = input().split()
i = 0
a = ''
b = ''
c = [0,0]
for i in range(int(M[0])):
    a += str(M[1])
for i in range(int(M[1])):
    b += str(M[0])
c[0] = int(a)
c[1] = int(b)  
c.sort()
print(str(c[1]))

Buggy submission (verdict: Runtime Error):
M = input().split()
i = 0
a = None
b = None
for i in range(int(M[0])):
    a += str(M[1])
alfa = int(a)
for i in range(M[1]):
    b += str(M[0])
beta = int(b)
delta = min(a,b)
print(delta)
Problem p02829 (python)

Fixed submission:
A = int(input())
B = int(input())
C = 6 - A - B
print(C)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
A&B = [A,B]
a&b&c = [1, 2, 3]
C = set(A&B) ^ set(a&b&c)
print(C)
Problem p02847 (python)

Fixed submission:
S = input()
if S == 'SUN':
	print(7)
elif S == 'MON':
	print(6)
elif S == 'TUE':
	print(5)
elif S == 'WED':
	print(4)
elif S == 'THU':
	print(3)
elif S == 'FRI':
	print(2)
elif S == 'SAT':
	print(1)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
S = input()
if S = ' SUN ':
	print(7)
elif S = ' MON ':
	print(6)
elif S = ' TUE ':
	print(5)
elif S = ' WED ':
	print(4)
elif S = ' THU ':
	print(3)
elif S = ' FRI ':
	print(2)
elif S = ' SAT ':
	print(1)
else:
  print(-1)
Problem p02753 (python)

Fixed submission:
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'

# %%
lst = input().split()

# %%
one = lst[0][0]
two = lst[0][1]
three = lst[0][2]


# %%
one_two = one != two
two_three = two != three
three_one = three != one


# %%
any([one_two, two_three, three_one])


# %%
if any([one_two, two_three, three_one]):
    print('Yes')
else:
    print('No')


# %%

Buggy submission (verdict: Runtime Error):
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'

# %%
one = lst[0][0]
two = lst[0][1]
three = lst[0][2]


# %%
one_two = one == two
two_three = two == three
three_one = three == one




# %%
if any([one_two, two_three, three_one]):
    print('Yes')
else:
    print('No')


# %%

Buggy submission (verdict: Runtime Error):
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'

# %%
one = lst[0][0]
two = lst[0][1]
three = lst[0][2]


# %%
one_two = one == two
two_three = two == three
three_one = three == one


# %%
any([one_two, two_three, three_one])


# %%
if any([one_two, two_three, three_one]):
    print('Yes')
else:
    print('No')


# %%
Problem p02754 (python)

Fixed submission:
lst = [int(i) for i in input().split()]
ball = lst[0]
blue = lst[1]
red = lst[2]

red_blue = int(ball / (red + blue))
shokichi = red_blue * blue
amari = ball - (red_blue * (red + blue))

if amari < blue:
    nokori = amari
elif amari > blue:
    nokori = blue
else:
    nokori = 0

if blue == 0:
    print(0)
else:
    print(shokichi + nokori)

Buggy submission (verdict: Runtime Error):
ball = lst[0]
blue = lst[1]
red = lst[2]
blue_red = int(ball / (red + blue)) + 1

blue_str = ''
for i in range(blue): blue_str += 'b'
red_str = ''
for i in range(red): red_str += 'r'

mojiretu = ''
for i in range(blue_red): mojiretu += (blue_str + red_str)
print(mojiretu[:ball].count('b'))
Problem p02951 (python)

Fixed submission:
a, b, c = map(int, input().split())
x = a - b
ans = c - x
if ans <= 0:
    print(0)
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
lst = [int(i) for i in input().split()]

flag = 0

if len(lst) == 1:
    flag = 1

for i in range(0,len(lst)-1):
    if lst[i]-1 == lst[i+1]:
        lst[i] = lst[i] - 1



if flag == 0:
    for i in range(0,len(lst)-1):
        if (lst[i] <= lst[i+1])&(flag==0):
            #print(str(lst[i])+'<='+str(lst[i+1]))
            flag = 0
        else:
            flag = 1



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

Buggy submission (verdict: Runtime Error):
tmp = int(input())
#tmp = 100000

input_num = tmp

lst = []
while tmp > 0:
    lst.append(tmp % 10)  # 余りが入るから右の桁から処理される。　例 345/10 % = 5
    tmp //= 10  # 必須
lst.reverse()

# print(lst)

# print(input_num)

ketasuu = len(lst)
ans = 0
flag = 0
tmp = 0

kazoeru = ketasuu - 1

# 桁数が偶数のとき
if ketasuu % 2 == 0:
    for keta_num in reversed(range(kazoeru)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

elif ketasuu == 1:
    ans = input_num

# 桁数が奇数のとき
else:
    # print((10**ketasuu) * lst[0])
    ans = input_num - ((10 ** kazoeru) * lst[0])
    ans = ans + 1

    for keta_num in reversed(range(kazoeru - 1)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

print(ans)

Buggy submission (verdict: Runtime Error):
tmp = int(input())
#tmp = 100000

input_num = tmp

lst = []
while tmp > 0:
    lst.append(tmp % 10)  # 余りが入るから右の桁から処理される。　例 345/10 % = 5
    tmp //= 10  # 必須
lst.reverse()

# print(lst)

# print(input_num)

ketasuu = len(lst)
ans = 0
flag = 0
tmp = 0

kazoeru = ketasuu - 1

# 桁数が偶数のとき
if ketasuu % 2 == 0:
    for keta_num in reversed(range(kazoeru)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

elif ketasuu == 1:
    ans = input_num

# 桁数が奇数のとき
else:
    # print((10**ketasuu) * lst[0])
    ans = input_num - ((10 ** kazoeru) * lst[0])
    ans = ans + 1

    for keta_num in reversed(range(kazoeru - 1)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

print(ans)
Problem p02753 (python)

Fixed submission:
import argparse

def main(s: str):
    if s[0] == s[1] == s[2]:
        return "No"
    else:
        return "Yes"

if __name__ == "__main__":
    s = input()
    print(main(s))

Buggy submission (verdict: Runtime Error):

import argparse

def main(s: str):
    if s[0] == s[1] == s[2]:
        return "No"
    else:
        return "Yes"

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("s", type=str)
    args = parser.parse_args()
    print(main(args.s))
Problem p02951 (python)

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

diff = a - b

if c < diff:
    print(0)
else:
    print(c - diff)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())


if a == b:
    num1 = a
else:
    num1 = a - b

if c =< num1:
    print(0)
else:
    print(c - num1)
Problem p02790 (python)

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

if a > b:
    print(str(b)*a)
else:
    print(str(a)*b)

Buggy submission (verdict: Runtime Error):
a, b = list(map(int, input().split()))

    if a > b:
        print(str(b)*a)
    else:
        print(str(a)*b)
Problem p02753 (python)

Fixed submission:
s = input()
if s == 'AAA':
  print('No')
elif s == 'BBB':
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
s = input()
if s == 'AAA':
  print 'No'
elif s == 'BBB':
  print 'No'
else:
  print 'Yes'
Problem p02759 (python)

Fixed submission:
n = int(input())
ans = (n // 2) + (n % 2)
print(ans)

Buggy submission (verdict: Runtime Error):
n = input()
return (n // 2) + (n % 2)
Problem p02759 (python)

Fixed submission:
n=int(input())
print(n//2+n%2)

Buggy submission (verdict: Runtime Error):
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(n//2+n%2)

Buggy submission (verdict: Runtime Error):
'''
    Auther: ghoshashis545 Ashis Ghosh
    college: jalpaiguri Govt Enggineering College
    Date:06/03/2020
'''
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(ceil(n/2))

Buggy submission (verdict: Runtime Error):
'''
    Auther: ghoshashis545 Ashis Ghosh
    college: jalpaiguri Govt Enggineering College
    Date:06/03/2020
'''
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(ceil(n/2))