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

Fixed submission:
from sys import stdin

readline = stdin.readline

_, *aa = map(int, open(0).read().split())
r = 0
mi = 1000000000
m = 0
for a in aa:
    if a < 0:
        m += 1
    b = abs(a)
    r += b
    mi = min(b, mi)
print(r - mi * 2 * (m % 2))

Buggy submission (verdict: Runtime Error):
def main():
    _ = input()
    A = map(int, input())
 
    B = tuple(map(abs, A))
    C = tuple(a for a in A if a < 0)
    print(sum(B) - min(B)*2*(len(C)%2))
 
 
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
 
readline = stdin.readline
 
def main():
    _, *A = map(int, open(0).read().split())
 
    B = tuple(map(abs, A))
    C = (a for a in A if a < 0)
    print(sum(B) - min(B)*2*(len(C)%2))
 
 
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin

readline = stdin.readline

def main():
    _, *A = map(int, open(0).read().split())
 
    B = map(abs, A)
    C = [a for a in A if a < 0]
    print(sum(B) - min(B)*2*(len(C)%2))
 
 
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin

readline = stdin.readline

_, *a = map(int, open(0).read().split())
res = 0
mi = 1_000_000_000
rem = True
for v in a:
    if v < 0:
        rem = not rem
    b = abs(v)
    res += b
    mi = min(b, mi)
if rem:
    res -= mi*2
print(res)

Buggy submission (verdict: Runtime Error):
from sys import stdin

readline = stdin.readline

_, *a = map(int, open(0).read().split())
res = 0
mi = 1_000_000_000
rem = True
for v in a:
    if v < 0:
        rem != rem
    b = abs(v)
    res += b
    mi = min(b, mi)
if rem:
    res -= mi*2
print(res)
Problem p03101 (python)

Fixed submission:
lh, lw = map(int, input().split())
h, w = map(int, input().split())

print(lh * lw - lh * w - lw * h + h * w)

Buggy submission (verdict: Runtime Error):
lh, lw = input().split()
h, w = input().split()

print(lh * lw - lh * w - lw * h + h + w)
Problem p03102 (python)

Fixed submission:
from functools import reduce

n, _, c = map(int, input().split())
bs = tuple(map(int, input().split()))

count = 0
for i in range(n):
    if reduce(
        lambda x, y: x + y[0] * y[1],
        zip(bs, map(int, input().split())),
        0,
    ) + c > 0:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
from sys import stdin


def na():
    return map(int, stdin().split())


n, _, c = na()
bs = na()

cnt = 0
for _ in range(n):
    if sum(x * y for x, y in zip(na(), bs)) > -c:
        cnt += 1

print(cnt)
Problem p03434 (python)

Fixed submission:
from itertools import zip_longest

def main():
    n, *a = map(int, open(0).read().split())
    a = reversed(sorted(a))
    res = sum(a - b for a, b in zip_longest(*[iter(a)]*2, fillvalue=0))
    print(res)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from itertools import zip_longest


def main():
    _, *a = map(int, open(0))
    a = sorted(a, reverse=True)
    print(sum(i - j for i, j in zip_longest(*[iter(a)]*2, fillvalue=0)))


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

Fixed submission:
def sum_digits(n):
    total = 0
    while n > 0:
        total += n % 10
        n //= 10
    return total


def main():
    n, a, b = map(int, open(0).read().split())
    res = 0
    for i in range(1, n+1):
        total = sum_digits(i)
        if a <= total and total <= b:
            res += i
    print(res)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def sum_digits(number):
    total = 0
    while number > 0:
        total += n % 10
        n //= 10
    return total


def main():
    n, a, b = map(int, open(0).read().split())
    res = 0
    for i in range(1, n+1):
        total = sum_digits(i)
        if a <= total and total <= b:
            res += total
    print(res)


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

Fixed submission:
import collections
N, K, Q = list(map(int, input().split()))
A = [int(input()) for i in range(Q)]
cs = collections.Counter(A)
for n in range(N):
    if cs[n+1] > Q-K:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
N, K, Q = list(map(int, input().split()))
A = [int(input()) for i in range(Q)]
plus = np.array([A.count(n+1) for n in range(N)])
scores = plus+K-Q
for score in scores:
    if score>0:
        print('Yes') 
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
N, K, Q = list(map(int, input().split()))
A = [int(input()) for i in range(Q)]
plus = np.array([A.count(n+1) for n in range(N)])
scores = plus+K-Q
result = [print('Yes') if score>0 else print('No') for score in scores]
Problem p02971 (python)

Fixed submission:
import numpy as np
n = int(input())
a =  [int(input()) for i in range(n)]
max_a_num = a.count(max(a))
b = sorted(a, reverse=True)
m1, m2 = b[0], b[1]
for i in range(n):
  if max_a_num == 1:
    if a[i] == m1:
      print(m2)
    else:
      print(m1)
  else:
    print(m2)

Buggy submission (verdict: Runtime Error):
n = int(input())
a =  [int(input()) for i in range(n)]

for i in range(n):
  print(max(a[:i], a[i+1:]))
Problem p02945 (python)

Fixed submission:
i=list(map(int,input().split()))
C=i[0]+i[1]
D=i[0]-i[1]
E=i[0]*i[1]

print(max([C,D,E]))

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

C=A+B
D=A-B
E=A*B

print(max(C,D,E))
Problem p02946 (python)

Fixed submission:
i = list(map(int,input().split()))
K = i[0]
X = i[1]
C = range(X-K+1,X+K)
print(' '.join(map(str,list(C))))

Buggy submission (verdict: Runtime Error):
i = list(map(int,input().split()))
K = i[0]
X = i[1]
print(int(range(X-K+1,X+K)))

Buggy submission (verdict: Runtime Error):
i = list(map(int,input().split()))
K = i[0]
X = i[1]
print(range(X-K+1,X-K-1)
Problem p03047 (python)

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

ans = N - (K-1)
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = int(input().split())

ans = N - (K-1)
print(ans)
Problem p03455 (python)

Fixed submission:
a,b = map(int, input().split())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main(){
    int a,b;
    cin >> a >> b;
    if(a*b % 2 == 0) cout << "Even\n";
    else cout << "Odd\n";
}

Buggy submission (verdict: Runtime Error):
a,b = map(int, input.split())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")
Problem p03813 (python)

Fixed submission:
x = int(input())
if x < 1200:
  print("ABC")
else:
  print("ARC")

Buggy submission (verdict: Runtime Error):
x = input()
if x < 1200:
  print("ABC\n")
else:
  print("ARC\n")
Problem p03943 (python)

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

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
if a+b==c or a==b+c or a+c==b:
  print("Yes")
else:
  print("No")
Problem p02917 (python)

Fixed submission:
N = int(input())
B = list(map(int, input().split()))
s = 0
for i in range(N-1):
  if i == 0:
    s += B[0]
  else:
    s += min(B[i-1], B[i])
print(s + B[N-2])

Buggy submission (verdict: Runtime Error):
N = int(input())
B = list(map(int, input().split()))
s = 0
for i in range(B):
  if i == 0:
    s += B[0]
  else:
    s += min(B[i-1], B[i])
print(s + B[N-1])
Problem p02991 (python)

Fixed submission:
N, M = map(int, input().split())
E = {}
for v in range(1,N*3+1):
    E[v] = []
for _ in range(M):
    u, v = map(int, input().split())
    E[u].append(v+N)
    E[u+N].append(v+2*N)
    E[u+2*N].append(v)
S, T = map(int, input().split())
dist = [-1 for _ in range(3*N)]
dist[S-1] = 0

q = []
q.append(S)
while q:
    n = q.pop(0)
    if n == T:
        break
    for t in E[n]:
        if dist[t-1] < 0:
            dist[t-1] = dist[n-1] + 1
            q.append(t)
print(-1 if dist[T-1] < 0 else dist[T-1] // 3)

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

g = {}
steps = 3
for v in range(1,N*steps+1):
    g[v] = []

for _ in range(M):
    u,v = map(int, input().split())
	g[u + N*0].append(v + N*1)
    g[u + N*1].append(v + N*2)
    g[u + N*2].append(v + N*0)

S,T = map(int, input().split())

visiting = [(S,0)]
visited = {}
while visiting:
    v,d = visiting.pop(0)
    if v in visited:
        continue
    visited[v] = d
    if v == T:
        break

    for v2 in g.get(v,()):
        if v2 in visiting or v2 in visited:
            continue
        visiting.append((v2,d+1))
if T in visited:
    print(visited[T] // steps)
else:
    print(-1)
Problem p03356 (python)

Fixed submission:
class uf():
    def __init__(self,n):
        self.root = [-1] * (n+1)

    def findroot(self,x):
        if self.root[x] < 0:
            return x
        else:
            self.root[x] = self.findroot(self.root[x])
            return self.root[x]

    def unite(self,x,y):
        rootx = self.findroot(x)
        rooty = self.findroot(y)
        if rootx == rooty:
            return
        else:
            self.root[rootx] += self.root[rooty]
            self.root[rooty] = rootx
            return

    def is_same_group(self,x,y):
        return self.findroot(x) == self.findroot(y)

N,M = map(int, input().split())
P = list(map(int, input().split()))

uf = uf(N)

for _ in range(M):
    x,y = map(int, input().split())
    uf.unite(x,y)

count = 0
for n in range(N):
    if uf.is_same_group(P[n],n+1):
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
N,M = map(int, input().split())
P = list(map(int, input().split()))

uf = uf(N)

for _ in range(1,M+1):
    x,y = map(int, input().split())
    uf.unite(x,y)

count = 0
for n in range(N):
    if uf.is_same_group(P[n-1],n+1):
        count += 1

print(count)
Problem p02909 (python)

Fixed submission:
s = input()

if s == 'Rainy':
	s = 'Sunny'
elif s == 'Cloudy':
	s = 'Rainy'
else:
	s = 'Cloudy'
print(s)

Buggy submission (verdict: Runtime Error):
n, k = [int(x) for x in (input().split())]
a = [int(x) for x in (input().split())]

for i in range(n):
	if a[i] == 1:
		print(i)
Problem p02911 (python)

Fixed submission:
L1 = input().split(" ")
L12 = int(L1[2])
score = [int(L1[1])-L12]*(int(L1[0]))
for i in range(L12):
    A = int(input()) - 1
    score[A] += 1

for j in score:
    if j > 0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
L1 = input().split(" ")
score = [int(L1[1])-int(L1[2])]*(int(L1[0])-1)
for i in range(int(L1[2])):
    A = int(input()) - 1
    score[A] += 1

for j in score:
    if j > 0:
        print("Yes")
    else:
        print("No")
Problem p02910 (python)

Fixed submission:
input0=input("")
e=0
f=0
g=0
i=0

c=input0[::2]
d=input0[1::2]

for a in c:
    b=2
    if(a=="L"):
        b=1
    else:
        b=0
    e=e+b
    
for a in d:
    b=2
    if(a=="R"):
        b=1
    else:
        b=0
    f=f+b

g=e+f

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

Buggy submission (verdict: Runtime Error):
input0=input("")
b=2
i=0

c=input0[::2]
d=input0[1::2]

for a in c:
    if(a=="L"):
        b=1
    else:
        b=0
    e=+b
    
for a in d:
    if(a=="R"):
        b=1
    else:
        b=0
    f=+b

g=e+f
if(g==0):
    print("Yes")
else:
    print("No")
Problem p02923 (python)

Fixed submission:
def solve():
    
    N = int(input())
    H = list(map(int, input().split()))
    result = []
    p = 0
    q = 0
    
    for i in range(N-1):     
        if H[i] >= H[i+1]:
            q += 1
        else:
            p = max(p, q)
            q = 0
    p = max(p, q)
    print(p)

solve()

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
result = []
p = 0
q = 0
    
for q in range(N):
    for i in range(N-1):     
        if H[i-1] >= H[i+p]:
            p += 1 
            q += 1
        else:
            result.append(q)
            break


print(max(result))
Problem p02911 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
import sys


def main():
    N, K, Q = map(int, input().split())
    score = np.zeros(N)
    for i in range(Q):
        score[int(input())-1] += 1
    for i in range(N):
        if K - Q +score[i] > 0:
            print("Yes")
        else:
            print("No")








if __name__ =='__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np
import sys


def main():
    N, K, Q = map(int, input().split())
    score = np.ones(N*Q).reshape(Q,N)
    for i in range(Q):
        score[i,int(input())-1] = 0
    score = np.sum(score,axis=0).reshape(-1,)
    score -= K
    for i in range(N):
        if score[i] <0:
            print("Yes")
        else:
            print("No")








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

Fixed submission:
N,A,B = map(int, input().split())
print(N*A if N*A <= B else B)

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

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

X = []
for i in range(N):
    x = [0 for _ in range(N)]
    for j in range(i, i+2):
        if j >= N:
            continue
        x[j] = 1
    if i == N - 1:
        x[0] = 1
    X.append(x)

Y = A
X = np.matrix(X)
Y = np.matrix(Y).reshape(-1, 1)
ans = np.linalg.solve(X,Y) * 2
ans = list(map(lambda x: str(int(x)), ans))
print(' '.join(ans).strip())

Buggy submission (verdict: Runtime Error):
L,R = map(int, input().split())

if R - L >= 2019:
    print(0)
else:
    m = 2020
    for i in range(L, R):
        m = min(m, i % 2019)
    print(m * (m+1))
Problem p03006 (python)

Fixed submission:
import sys

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]

XY.sort(key=lambda x: x[0])
XY.sort(key=lambda x: x[1])

if N == 1:
    print(1)
    sys.exit()

PQ = {}
for i in range(len(XY)):
    for j in range(len(XY)):
        pq = XY[i][0] - XY[j][0], XY[i][1] - XY[j][1]
        if pq == (0, 0):
            continue
        if pq in PQ.keys():
            PQ[pq] += 1
        else:
            PQ[pq] = 1

pq = max(PQ, key=lambda x: PQ[x])
print(N - PQ[pq])

Buggy submission (verdict: Runtime Error):
N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]

XY.sort(key=lambda x: x[0])
XY.sort(key=lambda x: x[1])

PQ = {}
for i in range(1, len(XY)):
    pq = XY[i][0] - XY[i-1][0], XY[i][1] - XY[i-1][1]
    if pq in PQ.keys():
        PQ[pq] += 1
    else:
        PQ[pq] = 1
pq = max(PQ, key=lambda x: PQ[x])
print(N - PQ[pq])

Buggy submission (verdict: Runtime Error):
N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]

XY.sort(key=lambda x: x[1])
XY.sort(key=lambda x: x[0])

PQ = {}
for i in range(1, len(XY)):
    pq = XY[i][0] - XY[i-1][0], XY[i][1] - XY[i-1][1]
    if pq in PQ.keys():
        PQ[pq] += 1
    else:
        PQ[pq] = 1
pq = max(PQ, key=lambda x: PQ[x])
print(N - PQ[pq])
Problem p03284 (python)

Fixed submission:
N, K = list(map(int, input().split(' ')))
print(0 if N % K == 0 else 1)

Buggy submission (verdict: Runtime Error):
import sys

N = int(input())

for i in range(26):
  for j in range(16):
    if N == i * 4 + j * 7:
      print('Yes')
      sys.exit()
print('No')
Problem p03288 (python)

Fixed submission:
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Buggy submission (verdict: Runtime Error):
R = input()
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")
Problem p03455 (python)

Fixed submission:
a, b = input().split(" ")

a = int(a)
b = int(b)

if (a * b) % 2 == 0:
  print("Even")
else:
  print("Odd")

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

if (s[0] * s[1]) / 2 == 0:
  print('Even')
else:
  print('Odd')

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

nums = s.split()

if (nums[0] * nums[1]) / 2 == 0:
  print('Even')
else:
  print('Odd')
Problem p03493 (python)

Fixed submission:
string = input()

one_counter = 0
for s in string:
  if s =="1":
    one_counter += 1

print(one_counter)

Buggy submission (verdict: Runtime Error):
_ = input()
num_list = input().split(" ")
num_list = list(map(lambda x:int(x), num_list))
 
shift_counter = 0
 
while(True):
  if sum(num_list) % 2 != 0:
    break
  
  num_list = [x / 2 for x in num_list]
  shift_counter += 1
 
print(shift_counter)

Buggy submission (verdict: Runtime Error):
_ = input()
num_list = input().split(" ")
num_list = list(map(lambda x:int(x), num_list))
 
shift_counter = 0
 
while(True):
  print(num_list)
  if sum(num_list) % 2 != 0:
    break
  
  num_list = [x / 2 for x in num_list]
  shift_counter += 1
 
print(shift_counter)

Buggy submission (verdict: Runtime Error):
_ = input()
num_list = input().split(" ")
num_list = list(map(lambda x:int(x), num_list))
min_num = min(num_list)

shift_counter = 0

while(True):
  if min_num == 1:
    break
  
  min_num /= 2
  shift_counter += 1

print(shift_counter)
Problem p02917 (python)

Fixed submission:
N = int(input())
b = list(map(int, input().split()))
a = [b[0]]
if N == 2:
  print(2*a[0])
elif N > 2:
  for i in range(N-2):
    a.append(min(b[i], b[i+1]))
  a.append(b[N-2])
  print(sum(a))

Buggy submission (verdict: Runtime Error):
N = int(input())
b = list(map(int, input().split()))
a = [b[0]]
if N == 2:
  a.append[b[0]]
elif N > 2:
  for i in range(N-2):
    a.append(min(b[i], b[i+1]))
  a.append(b[N-2])

print(sum(a))
Problem p02947 (python)

Fixed submission:
from operator import itemgetter
N = int(input())
S = [list(input()) for i in range(N)]

for l in range(N):
  S[l].sort()
  S[l] = ''.join(S[l]) 

S.sort()

X = []
p = 1

for j in range(N-1):
  if S[j] == S[j+1]:
    p +=1
  else:
    X.append(p)
    p = 1
X.append(p)


def comb(n):
  if n == 2: return 1
  else:
    return int(n*(n-1)/2)

ans = 0

for k in range(len(X)):
  ans += comb(X[k])

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [list(input()) for i in range(N)]
T = ['' for m in range(N)]

for l in range(N):
  S[l].sort()
  T[l] = ''.join(S[l])

ans = 0
for j in range(N):
  for k in range(j+1,N):
    if S[j][0] == S[k][0]:
      if S[j][N-1] == S[k][N-1]:
        if T[j] == T[k]:
          ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [list(input()) for i in range(N)]
T = []

for l in range(N):
  S[l].sort()
  T[l] = T[l].append(''.join(S[l]))

ans = 0
for j in range(N):
  for k in range(j+1,N):
    if S[j][0] == S[k][0]:
      if S[j][N-1] == S[k][N-1]:
        if T[j] == T[k]:
          ans += 1


          
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [list(input()) for i in range(N)]

for l in range(N):
  S[l].sort()

ans = 0
for j in range(N):
  for k in range(j+1,N):
    if S[j][0] == S[k][0]:
      if S[j][N-1] == S[k][N-1]:
        if ''.join(S[j]) == ''.join(S[k]):
          ans += 1


          
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [list(input()) for i in range(N)]

for l in range(N):
  S[l].sort()

ans = 0
for j in range(N):
  for k in range(j+1,N):
    if S[j][0] == S[k][0]:
      if S[j][N-1] == S[k][N-1]:
      if (''.join(S[j]) == ''.join(S[k])):
        ans += 1
           
           
print(ans)
Problem p02969 (python)

Fixed submission:
r=int(input())
print(3*(r**2))

Buggy submission (verdict: Runtime Error):
int(input())
print(3*(r**2))
Problem p02911 (python)

Fixed submission:
n,k,q = [int(x) for x in input().split()]
li = []
for i in range(q):
    a = int(input())
    li.append(a)
score = [k] * (n + 1)
temp =[0]*(n+2)
for pe in li:
    temp[1] += (-1)
    temp[pe] -= (-1)
    temp[pe + 1] += (-1)
    temp[n + 1] -= (-1)

for i in range(1,n + 2):
    temp[i] += temp[i - 1]
#print(temp)
for i in range(1,n + 1):
    score[i] += temp[i]
    if(score[i] <= 0):
        print('No')
    else:
        print('Yes')

Buggy submission (verdict: Runtime Error):
n,k,q = [int(x) for x in input().split()]
li = []
score = [k]*n
for i in range(q):
    a = int(input())
    li.append(a)
    score = [x-1 for x in score]
    score[pe-1] = score[pe-1]+1
result = []
for i in range(len(score)):
    if score[i]>0:
        print('Yes')
    else:
        print('No')
Problem p03238 (python)

Fixed submission:
n, *t = map(int, open(0))
if n == 1:
    print("Hello World")
else:
    print(sum(t))

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, open(0))
if n == 1:
    print("Hello World")
else:
    print(a+b)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, open(0).read().split())
if n == 1:
    print("Hello World")
else:
    print(a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
if n==1:
    print("Hello World")
else:
    a,b=map(int, input().split())
    print(a+b)
Problem p03284 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
print("01"[a%b])
Problem p04043 (python)

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

if A[0] == 5 and A[1] == 5 and A[2] == 7:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
L, N = map(int, input().split())
s = [input() for i in range(N)]
s.sort()
print(''.join(s))
Problem p04044 (python)

Fixed submission:
N,L = map(int, input().split())
s = [input() for i in range(N)]
s.sort()
print(''.join(s))

Buggy submission (verdict: Runtime Error):
L, N = map(int, input().split())
s = [input() for i in range(N)]
print("".join(sorted(s)))
Problem p02922 (python)

Fixed submission:
a, b = map(int, input().split())
i = 0
count = 0
if b == 1:
    print(0)
else:
    while count < b:
        i += 1
        count = i*a-(i-1)
    
    else:
        print(i)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
i = 0
count = 0
if b == 1:
    print(0)
else:
    while count < b:
    i += 1
    count = i*a-(i-1)
    
    else:
        print(i)
Problem p03325 (python)

Fixed submission:
n = int(input())
a_list = list(map(int, input().split()))
def count_2(num):
    count = 0
    while num%2 == 0:
        num /= 2
        count += 1
    return count
ans = 0
for i in range(n):
    ans += count_2(a_list[i])
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a_list = list(map(int, input().split()))
def count_2(num):
    count = 0
    while num%2 == 0:
        num /= 2
        pritn(num)
        count += 1
    return count
ans = 0
for i in range(n):
    ans += count_2(a_list[i])
print(ans)
Problem p03777 (python)

Fixed submission:
a, b = map(str, input().split())
if a==b:
    print("H")
else:
    print("D")

Buggy submission (verdict: Runtime Error):
a, b = map(str, input().split())
if a==b:
    print("H")
else:
    pritn("D")
Problem p03795 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(str, input().split())
if a==b:
    print("H")
else:
    print("D")

Buggy submission (verdict: Runtime Error):
n = input()
x = 800*n
y = 200*(n//15)
print(x*y)
Problem p03813 (python)

Fixed submission:
x = int(input())

if x<1200:
    print("ABC")
else:
    print("ARC")

Buggy submission (verdict: Runtime Error):
x = input()

if x<1200:
    print("ABC")
else:
    print("ARC")

Buggy submission (verdict: Runtime Error):
x = input().int()

if x<1200:
    print("ABC")
else:
    print("ARC")