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

Fixed submission:
from sys import stdin, stdout
from collections import defaultdict
def readLine_str_list():return list(map(str, stdin.readline().split()))
def readLine_int_list():return list(map(int, stdin.readline().split()))
def readAll_str(): return list(list(map(str,i.split())) for i in stdin.read().split("\n"))
def g_twoD_list(p,q): return [[0 for i in range(p)] for j in range(q)]


def main():
    h,w = readLine_int_list()
    a = g_twoD_list(w,h)
    b = defaultdict(lambda: 0)
    _h = 0
    _w = 0
    for l in readAll_str():
        for i in l:
            _w = 0
            for j in i:
                b[(_h,_w)] = j
                _w += 1
            _h += 1
            
    dir_b = [(-1,0), (1,0), (0,-1), (0,1), (-1,-1), (-1,1), (1,-1), (1,1)]
    for i in range(h):
        for j in range(w):
            cnt = 0
            for d in dir_b:
                r = b[(i+d[0], j+d[1])]
                if r == '#':
                    cnt += 1
            if b[(i,j)] == '.':
                b[(i,j)] = str(cnt)
    # print(b)
    for i in b:
        if 0 <= i[0] < h and 0 <= i[1] < w:
            a[i[0]][i[1]] = b[i]
            
    for i in a:
        print(''.join(i))
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin, stdout
from collections import defaultdict
def readLine_str_list():return list(map(str, stdin.readline().split()))
def readLine_int_list():return list(map(int, stdin.readline().split()))
def readAll_str(): return list(list(map(str,i.split())) for i in stdin.read().split("\n"))
def g_twoD_list(p,q): return [[0 for i in range(p)] for j in range(q)]


def main():
    h,w = readLine_int_list()
    a = g_twoD_list(h,w)
    b = defaultdict(lambda: 0)
    
    _h = 0
    _w = 0
    for l in readAll_str():
        for i in l:
            _w = 0
            for j in i:
                b[(_h,_w)] = j
                _w += 1
            _h += 1
            
    dir_b = [(-1,0), (1,0), (0,-1), (0,1), (-1,-1), (-1,1), (1,-1), (1,1)]
    for i in range(h):
        for j in range(w):
            cnt = 0
            for d in dir_b:
                r = b[(i+d[0], j+d[1])]
                if r == '#':
                    cnt += 1
            if b[(i,j)] == '.':
                b[(i,j)] = str(cnt)
    # print(b)
    for i in b:
        if 0 <= i[0] < h and 0 <= i[1] < w:
            a[i[0]][i[1]] = b[i]
            
    for i in a:
        print(''.join(i))
if __name__ == "__main__":
    main()
Problem p03589 (python)

Fixed submission:
N = int(input())
for h in range(1, 3501):
    for n in range(1, 3501):
        a = 4 * h * n - h * N - n * N
        if a == 0:
            break
        w = int((h * n * N) / a)
        if w > 0 and 4 / N == 1 / h + 1 / n + 1 / w:
            print(h, n, w)
            exit()

Buggy submission (verdict: Runtime Error):
N = int(input())
flag = False
memo = {}
for a in range(1,3500)[::-1]:
    for b in range(1,3500)[::-1]:
        if (a,b) not in memo:
            memo[(b,a)] = True
            if (N*a*b)%(4*a*b -N*n - N*b) == 0:
                c = int((N*a*b)/(4*a*b -N*n - N*b))
                flag = True
                break
        else:
            continue
    if flag:
        break
print(a,b,c)

Buggy submission (verdict: Runtime Error):
n = int(input())
flag = False
memo = {}
for a in range(1,3500)[::-1]:
    for b in range(1,3500)[::-1]:
        if (a,b) not in memo:
            memo[(b,a)] = True
             
            if (N*a*b)%(4*a*b -N*n - N*b) == 0:
                c = int((N*a*b)/(4*a*b -N*n - N*b))
                flag = True
                break
        else:
            continue
    if flag:
        break
print(a,b,c)
Problem p03609 (python)

Fixed submission:
x, t = (int(i) for i in input().split())
ans = x-t
if ans < 0:
    ans = 0
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
cnt = [0]*100002
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))
Problem p03611 (python)

Fixed submission:
n = int(input())
cnt = [0]*100002
for i in list(int(i) for i in input().split()):
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
max_num = max(a)
cnt = [0]*(max_num+1)

for i in a:
    cnt[i] = cnt[i]+1

maxn = cnt[0] + cnt[1]

for i in range(max_num):
    maxn = max(maxn, cnt[i-1] + cnt[i] + cnt[i+1])
    
print(maxn)
Problem p03633 (python)

Fixed submission:
from sys import stdin, stdout
def readAll_int(): return list(map(int, stdin))

def gcd(a, b):
	while b:
	    a, b = b, a % b
	return a
	
def lcm(a, b):
    return a * b // gcd (a, b)

def main():
    n = int(input())
    t = list(set(readAll_int()))
    if len(t)>1:
        for i in range(len(t) - 1):
            a = lcm(t[i], t[i+1])
            t[i+1] = a
    else:
        a = t[0]
    print(a)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin, stdout
from collections import defaultdict
def readLine_int_list(): return list(map(int, stdin.readline().split()))
def readAll_int(): return list(map(int, stdin))

def gcd(a, b):
	while b:
	    a, b = b, a % b
	return a
	
def lcm(a, b):
    return a * b // gcd (a, b)

def main():
    n = int(input())
    # t = sorted(list(set(readAll_int())))
    t = readAll_int()
    for i in range(len(t) - 1):
        a = lcm(t[i], t[i+1])
        t[i+1] = a
    print(a)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin, stdout
from collections import defaultdict
def readLine_int_list():return list(map(int, stdin.readline().split()))
def readLine_int_list_reverse(): return list(map(int, stdin.readline().split())).reverse()
def readAll_int(): return list(map(int, stdin))
def readLine_str_list():return list(map(int, stdin.readline().split()))
def readAll_str(): return list(map(int, stdin))
def g_twoD_list(p,q): return [[0 for i in range(p)] for j in range(q)]


from sys import stdin, stdout
from collections import defaultdict
def readLine_int_list(): return list(map(int, stdin.readline().split()))
def readAll_int(): return list(map(int, stdin))

def gcd(a, b):
	while b:
	    a, b = b, a % b
	return a
	
def lcm(a, b):
    return a * b // gcd (a, b)

def main():
    n = int(input())
    t = list(set(readAll_int()))
    for i in range(len(t) - 1):
        a = lcm(t[i], t[i+1])
        t[i+1] = a
    print(a)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin, stdout
from collections import defaultdict
def readLine_int_list():return list(map(int, stdin.readline().split()))
def readAll_int(): return list(map(int, stdin))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
	
def lcm(a, b):
	return a * b // gcd (a, b)

def main():
    n = int(input())
    t = sorted(list(set(readAll_int())))
    for i in range(len(t) - 1):
        a = lcm(t[i], t[i+1])
        t[i+1] = a
    print(a)

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

Fixed submission:
n = str(input())
print("ABC"+n)

Buggy submission (verdict: Runtime Error):
n, m = (int(i) for i in input().split())
island = [[] for i in range(n)]

for i in range(m):
    a, b = (int(i)-1 for i in input().split())
    if a == 0:
        island[a].append(b)
    elif a == n-1:
        island[n-1].append(b)
    elif b == 0:
        island[b].append(a)
    elif b == n-1:
        island[n-1].append(a)

ans = "IMPOSSIBLE"
for i in island[0]:
    if i in island[n-1]:
        ans = "POSSIBLE"
        break

print(ans)

Buggy submission (verdict: Runtime Error):
n, m = (int(i) for i in input().split())
island = [[] for i in range(n)]

for i in range(m):
    a, b = (int(i)-1 for i in input().split())
    if a == 0:
        island[a].append(b)
    elif a == n-1:
        island[n-1].append(b)
    elif b == 0:
        island[b].append(a)
    elif b == n-1:
        island[n-1].append(a)

print(island)
ans = "IMPOSSIBLE"
for i in island[0]:
    if i in island[n-1]:
        ans = "POSSIBLE"
        break

print(ans)
Problem p03651 (python)

Fixed submission:
def gcd(a,b):
    while b > 0:
        a, b = b, a%b
    return a

def gcd_list(lst):
    g = lst[0]
    for i in range(1,len(lst)):
        g = gcd(g,lst[i])
    return g
    
n, k = (int(i) for i in input().split())
a = list(int(i) for i in input().split())  

maxA=max(a)

if (k <= maxA and k%gcd_list(a) == 0) or (k in a):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    while b > 0:
        a, b = b, a%b
    return a

def gcd_list(lst):
    a = gcd(lst[0],lst[1])
    i=2
    while a > 0 and i<len(lst):
        a = gcd(a, lst[i])
        if a == 1:
            return 1
            break
        i+=1
    return a
    
n, k = (int(i) for i in input().split())
a = list(int(i) for i in input().split())  
maxA=max(a)

if maxA >= k and k%gcd_list(a) == 0:
    print("POSSIBLE")
elif k in a:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Here your code !
def gcd(a,b):
    while b > 0:
        a, b = b, a%b
    return a

def gcd_list(lst):
    a = gcd(lst[0],lst[1])
    i=2
    while a > 0 and i<len(lst):
        a = gcd(a, lst[i])
        if a == 1:
            return 1
            break
        i+=1
    return a
    
n, k = (int(i) for i in input().split())
a = list(int(i) for i in input().split())  
maxA=max(a)

if maxA >= k and gcd_list(a)%k == 0:
    print("POSSIBLE")
elif k in a:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    while b > 0:
        a, b = b, a%b
    return a

def gcd_list(lst):
    a = gcd(lst[0],lst[1])
    i=2
    while a > 0 and i<len(lst):
        a = gcd(a, lst[i])
        if a == 1:
            return 1
            break
        i+=1
    return a
    
n, k = (int(i) for i in input().split())
print(n,k)
a = list(int(i) for i in input().split())  
print(a)
maxA=max(a)

if maxA >= k and gcd_list(a)%k == 0:
    print("POSSIBLE")
elif k in a:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
Problem p03693 (python)

Fixed submission:
r = input().split()
ans = int(r[0]) * 100 + int(r[1]) *10 + int(r[2])
if ans%4 == 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Here your code !

n = int(input())
a = input().split()
a_int = sorted(list(map(int,a )))
print(a_int)
max_a = max(a_int)

col = [0,0,0,0,0,0,0,0]
all_col = 0 

for i in range(len(a_int)):
    if a_int[i] < 400:
        col[0] += 1
    elif a_int[i] < 800:
        col[1] += 1
    elif a_int[i] < 1200:
        col[2] += 1
    elif a_int[i] < 1600:
        col[3] += 1
    elif a_int[i] < 2000:
        col[4] += 1
    elif a_int[i] < 2400:
        col[5] += 1
    elif a_int[i] < 2800:
        col[6] += 1
    elif a_int[i] < 3200:
        col[7] += 1
    else:
        all_col += 1

min_c = len(list(filter((lambda x: x > 0), col)))
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+'  ' +str(max_c))
Problem p03694 (python)

Fixed submission:
n = input()
r = input().split()
r =list(map(int,r))
max_i= max(r)
min_i= min(r)
print(max_i - min_i)

Buggy submission (verdict: Runtime Error):
r = input().split()
max_i= max(r)
min_i= min(r)
print(max_i - min_i)
Problem p03695 (python)

Fixed submission:
from sys import stdin, stdout
def readLine_int_list():return list(map(int, stdin.readline().split()))


def main():
    n = input()
    a = readLine_int_list()

    c = []
    _c = [] 

    for i in a:
        rank = i//400
        if rank > 7:
           _c.append(rank) 
        else:    
            c.append(rank)
    
    
    p = len(set(c))
    print(max(1,p), p+len(_c))

        
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
c= [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] > 8 * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+' ' +str(max_c))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
c= [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] > max_c * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+' ' +str(max_c))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
max_c = 8
c= [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] > max_c * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
 
print(str(min_c)+' ' +str(max_c))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a)
col = 400
all_col = 0 
max_c = 8
for i in range(n):
    if a_int > max_c * col:
        all_col += 1
    else:
        ii = int(a_int/col)
        if c[ii] < 1
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)

print(str(min_c)+' ' +str(max_c))
Problem p03777 (python)

Fixed submission:
def read_str_list():
    return list(str(i) for i in input().split())
a,b = read_str_list()
if a == "H":
    print(b)
else:
    if b == "H":
        print("D")
    else:
        print("H")

Buggy submission (verdict: Runtime Error):
a,b = list(int(i) for i in input().split())
if a == 1:
    a = 14
if b == 1:
    b = 14
if a==b:
    print("Draw")
else:
    print("Alice" if a>b else "Bob")
Problem p03795 (python)

Fixed submission:
n = int(input())
print(800*n -(n//15)*200)

Buggy submission (verdict: Runtime Error):
n = int(input())
print(800*n -(n%15)＊200)
Problem p03817 (python)

Fixed submission:
from math import ceil
def main(): print(ceil((int(input())-6)/11*2)+1)
if __name__ == "__main__": main()

Buggy submission (verdict: Runtime Error):
import math
import itertools
import heapq
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect, bisect_left, bisect_right
from collections import defaultdict, deque


# d = defaultdict(lambda: 0)
# setrecursionlimit(10**7)
# inf = float("inf")


##### stdin ####
def LM(t, r): return list(map(t, r))
def R(): return stdin.readline()
def RS(): return R().split()
def I(): return int(R())
def F(): return float(R())
def LI(): return LM(int,RS())
def LF(): return LM(float,RS())
def ONE_SL(): return list(input())
def ONE_IL(): return LM(int, ONE_SL())
def ALL_I(): return map(int, stdin)
def ALL_IL(): return LM(int,stdin)

##### tools #####
def ap(f): return f.append
def pll(li): print('\n'.join(LM(str,li)))
def pljoin(li, s): print(s.join(li))



##### main #####

class BIT(object):

	def __init__(self,l):
		self.size = l
		self.bit = [0]* (self.size+1)

	def sum(self, i):
		s = 0
		while i > 0:
			s += self.bit[i]
			i -= i & -i
		return s

	def add(self, i, x):
		while i < self.size:
			self.bit[i] += x
			i += i & -i

	def __str__(self):
		return str(self.bit)


def main():
	N,M = LI()

	bit = BIT(M+2)
	L = []
	R = []
	b = [[] for i in range(M+1)]


	for i in range(N):
		l,r = LI()
		L.append(l); R.append(r)
		b[r-l +1].append(i)
	b = []

	gone = 0
	for d in range(1, M+1):
		for i in b[d]:
			gone+=1
			bit.add(L[i], 1)
			bit.add(R[i]+1, -1)


		ans = N-gone

		for m in range(d, M+1, d):

			ans += bit.sum(m)
		print(ans)




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

Fixed submission:
n=list(int(i) for i in input().split())
n.sort()
if n[0]+n[1]==n[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n= (int(i) for i in input().split())
n.sort()
if n[0]+n[1]==n[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = list(int(i) in input().split())
n.sort()
if n[0]+n[1]==n[2]:
    print("Yes")
else:
    print("No")
Problem p03994 (python)

Fixed submission:
def main():
    s = input()
    n = int(input())
    
    t = []
    a = []
    for i in s:
        ord_i = ord(i)
        t.append(((123 - ord_i)%26, ord_i))
    
    for i in t:
        if n >= i[0]:
            a.append('a')
            n -= i[0]
        else:
            a.append(chr(i[1]))
            
    a[-1] = chr(ord(a[-1]) + n%26)
    print(''.join(a))
    
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
s = input()
n = int(input())

t = []
a = []
for i in s:
    ord_i = ord(i)
    t.append((123 - ord_i, ord_i))

for i in t:
    if n >= i[0]:
        a.append(chr(97))
        n -= i[0]
    else:
        a.append(chr(i[1]))
    
temp = ord(a[-1]) + n
a[-1] = chr(temp)
print(''.join(a))
Problem p03742 (python)

Fixed submission:
if __name__=='__main__':
    m,n = map(int,input().split())
    if abs(m-n)>1:
        print('Alice')
    else:
        print('Brown')

Buggy submission (verdict: Runtime Error):
if __name__='__main__':
    m,n = map(int,input().split())
    if abs(m-n)>1:
        print('Alice')
    else:
        print('Brown')
Problem p03503 (python)

Fixed submission:
import numpy as np

n = int(input())
f = np.zeros((n, 10), dtype=np.int64)
p = np.zeros((n, 11), dtype=np.int64)

for i in range(n):
  tmp = list(map(int, input().split()))
  for j in range(10):
      f[i][j] = tmp[j]
for i in range(n):
  tmp = list(map(int, input().split()))
  for j in range(11):
    p[i][j] = tmp[j]

r = -1e18
for b in range(1, 1<<10):
  s = 0
  for i in range(n):
    c = 0
    for j in range(10):
      if (b >> j) & 1 == 1 and f[i][j]:
        c += 1
    s += p[i][c]
  if r < s:
    r = s

print(r)

Buggy submission (verdict: Runtime Error):
import numpy as np

n = int(input())
f = np.zeros((n, 10), dtype=np.int64)
p = np.zeros((n, 11), dtype=np.int64)

for i in range(n):
  tmp = list(map(int, input().split()))
  for j in range(10):
      f[i][j] = tmp[j]
for i in range(n):
  tmp = list(map(int, input().split()))
  for j in range(11):
    p[i][j] = tmp[j]

r = -1e18
for b in range(1, 1<<10):
  s = 0
  for i in range(n):
    c = 0
    for j in range(10):
      if (b >> j) & 1 == 1 and f[i][j]:
        c += 1
    s += p[i][c]
  if r < s:
    r = s

print(r)
Problem p04029 (python)

Fixed submission:
def acum(n):
    if n <= 1:
        return 1
    return n + acum(n - 1)
print(acum(int(input())))

Buggy submission (verdict: Runtime Error):
print((n=int(input()))*-~n>>1)

Buggy submission (verdict: Runtime Error):
def fact(n):
    if n <= 0:
        return 1
    return n * fact(n - 1)

n = input()
print(fact(n))
Problem p03845 (python)

Fixed submission:
ProNum = int(input())
time = input()
time = (time.split())
TotalTime = 0

for t in time:
  TotalTime += int(t)
                  
DrinkNum = int(input())

for d in range(DrinkNum):
  line = input()
  line = line.split()
  diff = int(line[1]) - int(time[int(line[0])-1])
  print(TotalTime+diff)

Buggy submission (verdict: Runtime Error):
ProNum = int(input())
time = input()
time = time.split()
TotalTime = 0

for t in time:
  TotalTime += int(t)
                  
DrinkNum = int(input())

for d in range(DrinkNum):
  line = input()
  line = line.split()
  diff = int(line[1]) - int(time[int(line[0])])
  print(TotalTime+diff)

Buggy submission (verdict: Runtime Error):
ProNum = int(input())
time = input()
time = time.split()
TotalTime = 0

for t in time:
  TotalTime += int(t)
                  
DrinkNum = int(input())

for d in range(DrinkNum):
  line = input()
  line = line.split()
  diff = int(line[1]) - int(time(int(line[0])))
  print(TotalTime+diff)

Buggy submission (verdict: Runtime Error):
ProNum = int(input())
time = input()
time = time.split()
TotalTime = 0

for t in time:
  TotalTime += t

DrinkNum = int(input())

for d in range(DrinkNum):
  line = input()
  line = line.split()
  diff = int(line[1]) - int(time(int(line[0])))
  print(TotalTime+diff)
Problem p03962 (python)

Fixed submission:
s = input()
l = s.split()
 
 
count = 6
 
if l[0] == l[1]:
  count -= 1
if l[1] == l[2]:
  count -= 1
if l[2] == l[0]:
  count -= 1
  
print(int(count/2))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())

count = 0

if a != b:
  count += 1
if b != c:
  count += 1
if a != c:
  count += 1
  
print(int(count/2))
Problem p03963 (python)

Fixed submission:
s = input()
s = s.split()
n = int(s[0])
k = int(s[1])

if n==1:
  print(k)
elif n==2:
  print(k*(k-1))
else:
  ans = k
  for i in range(n-1):
    ans = ans*(k-1)
  print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())

ans=1

for i in range(k):
  ans = ans*n
  n -= 1
  
print(ans)
Problem p04012 (python)

Fixed submission:
flag = 1
s = input()
d = {}
for i in s:
  if i in d:
    d[i] += 1
  else:
    d[i] = 1

for key in d:
    if d[key] %2 != 0:
      flag = 0     
if flag == 0:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
s = input()
d = {}
for i in s:
  if i in d:
    d[i] += 1
  else:
    d[i] = 1

for key in d:
  if d[key] %2 != 0
  	print("No")
    break
Problem p04030 (python)

Fixed submission:
s = input()
output_s = ""

for i in s:
  if i == "B" and len( output_s) != 0:
    output_s = output_s[0:len( output_s)-1]
  elif i != "B":
    output_s += i
  
print(output_s)

Buggy submission (verdict: Runtime Error):
s = input()
for i in range(len(s)-1):
  if s[i+1] != 'B':
    ans += s[i]
    
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
for i in range(len(s)):
  if s[i+1] != 'B':
    ans += s[i]
    
print(ans)
Problem p04043 (python)

Fixed submission:
form = input()
form = form.split()
form.sort()

if form == ["5","5","7"]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
if a>b or b>c or a>c or a>b:
    print("NO")
else:
    print("YES")

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

s.sort()

if s = ["5","5","7"]:
  print("YES")
else:
  print("NO")
Problem p04044 (python)

Fixed submission:
Firstline = input()
Firstline = Firstline.split()

List = []
for i in range(int(Firstline[0])):
  List.append(input())

List.sort()
s = ""
for i in List:
  s += i

print(s)

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

List = []
for i in int(Firstline[0]):
  List.append(input())

List.sort()
s = ""
for i in List:
  s += i

print(s)
Problem p03337 (python)

Fixed submission:
# coding: utf-8
a, b = map(int, input().split())
max = -99999999999999
X = [a+b,a-b,a*b]
for i in range(len(X)):
    if X[i] > max:
        max = X[i]

print(max)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
N = int(input())

P = []
max = -9999999999999
count = 0
a = int(input())
b = a
max = a
P.append(a)
for i in range(0,N-1):
    a = int(input())
    if a < b:
        P.
        count += 1
        b = a
    if a > max:
        max = a
        count += 1


print(count)