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

Fixed submission:
a = int(input())
b = int(input())
h = int(input())

print(int((a + b) * h / 2))

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

print(int((a + b) * h / 2))

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

print((a + b) * h / 2)
Problem p04011 (python)

Fixed submission:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N > K:
  print(K*X + (N-K)*Y)
else:
  print(N*X)

Buggy submission (verdict: Runtime Error):
nums = list(map(int,input().split()))
N = int(nums[0])
K = int(nums[1])
X = int(nums[2])
Y = int(nums[3])

if N > K:
  print(K*X + (N-K)*Y)
else:
  print(N*X)
Problem p04029 (python)

Fixed submission:
N = int(input())
n = 0

for i in range(1,N+1,1):
  n += i
  
print(n)

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

for i in range(1,N+1,1)
  n += i
  
print(n)

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

while n <= N:
  n += 1
  
print(str(n))
Problem p04043 (python)

Fixed submission:
nums = list(map(int,input().split()))
nums.sort()
if nums[0] == 5 and nums[1] == 5 and nums[2] == 7:
            print("YES")
else:
            print("NO")

Buggy submission (verdict: Runtime Error):
nums = list(map(int,input().split())
nums.sort()
if nums[0] == 5 and nums[1] == 5 and nums[2] == 7:
            print("YES")
else:
            print("NO")

Buggy submission (verdict: Runtime Error):
nums = list(map(int,input(),split())
nums.sort()
if nums[0] == 5 and nums[1] == 5 and nums[2] == 7:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
nums = list(map(int,input(),split())
nums.sort()
if nums[0] == 5 and nums[1] == 5 and nums[2] == 7:
            print("YES")
else:
            print("NO")
Problem p02921 (python)

Fixed submission:
ss = input()
tt = input()

c = 0
for s, t in zip(ss, tt):
    if s == t and (s == 'R' or s == 'C' or s == 'S'):
       c += 1

print(c)

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

print((N*(N-1))//2)

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

print((N*(N-1))//2)

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

print((N*(N-1))/2)
Problem p02924 (python)

Fixed submission:
N = int(input())
print((N*(N-1))//2)

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

print((n*(n-1))/2)

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

print(n*(n-1)/2)
Problem p02866 (python)

Fixed submission:
#B
import collections

N = int(input())
D = list(map(int, input().split()))
is_first_zero = True
if D[0] != 0:
    is_first_zero = False
if is_first_zero:
    c = sorted(collections.Counter(D).items(), key=lambda x:x[0])
    if len(c) == 2:
        res = 1
    for index, i in enumerate(c):
        ind = i[0]
        num = i[1]
        if ind == 0:
            if num != 1:
                is_first_zero = False
                break
        else:
            if ind != pre_ind + 1:
                is_first_zero = False
                break
            else:
                if index == 2:
                    res = pre_num ** num
                elif index > 2:
                    res = res * (pre_num ** num)
                #print(res)
        pre_ind = ind
        pre_num = num
                
if is_first_zero:
    print(res % 998244353)
else:
    print("0")

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())
D = list(map(int, input().split()))
is_first_zero = True
if D[0] != 0:
    is_first_zero = False
if is_first_zero:
    c = sorted(collections.Counter(D).items(), key=lambda x:x[0])
    #print(c)
    for index, i in enumerate(c):
        ind = i[0]
        num = i[1]
        if ind == 0:
            if num != 1:
                is_first_zero = False
                break
        else:
            if ind != pre_ind + 1:
                is_first_zero = False
                break
            else:
                if index == 2:
                    res = pre_num ** num
                elif index > 2:
                    res = res * (pre_num ** num)
                #print(res)
        pre_ind = ind
        pre_num = num
                
if is_first_zero:
    print(res % 998244353)
else:
    print("0")

Buggy submission (verdict: Runtime Error):
#B
import collections

N = int(input())
D = list(map(int, input().split()))
is_first_zero = True
if D[0] != 0:
    is_first_zero = False
if is_first_zero:
    c = sorted(collections.Counter(D).items(), key=lambda x:x[0])
    #print(c)
    for index, i in enumerate(c):
        ind = i[0]
        num = i[1]
        if ind == 0:
            if num != 1:
                is_first_zero = False
                break
        else:
            if ind != pre_ind + 1:
                is_first_zero = False
                break
            else:
                if index == 2:
                    res = pre_num ** num
                elif index > 2:
                    res = res * (pre_num ** num)
                #print(res)
        pre_ind = ind
        pre_num = num
                
if is_first_zero:
    print(res)
else:
    print("0")
Problem p02882 (python)

Fixed submission:
#D
import math
a,b,x = map(float,input().split())
w_theta = math.atan(b / a)
w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
if x > 0.5*a*a*b:
    theta = math.degrees(math.atan((2. * (((a ** 2) * b) - x)) / (a ** 3)))
else:
    theta = math.degrees(math.atan((a * (b ** 2))/ (2. * x)))
print(theta)

Buggy submission (verdict: Runtime Error):
import math
a,b,x = map(float,input().split())
w_theta = math.atan(b / a)
w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
if x > w_p:
  theta = math.degrees(math.atan((2. * (((a ** 2) * b) - x)) / (a ** 3)))
  else:
    theta = math.degrees(math.atan((a * (b ** 2))/ (2. * x)))
    print(theta)

Buggy submission (verdict: Runtime Error):
    import math
    a,b,x = map(float,input().split())
    w_theta = math.atan(b / a)
    w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
    if x >= w_p:
        theta = math.degrees(math.atan((2. * (((a ** 2) * b) - x)) / (a ** 3)))
    else:
        theta = math.degrees(math.atan((a * (b ** 2))/ (2. * x)))
    print(theta)
Problem p02887 (python)

Fixed submission:
n = int(input())
s = input()

import re


def nchars(s, n):
    """文字列 s に、同じ文字が n 個以上連続している部分文字列を見つける
    """
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))  # カンマを取ると n 個ちょうどになる
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]
        
d = nchars(s, 2)
for d_ in d:
    n -= len(d_) - 1
print(n)

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

import re


def nchars(s, n):
    """文字列 s に、同じ文字が n 個以上連続している部分文字列を見つける
    """
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))  # カンマを取ると n 個ちょうどになる
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]
        
d = nchars(s, 2)
for d_ in d:
    n -= len(d_) - 1
print(n)n = int(input())
s = input()

import re


def nchars(s, n):
    """文字列 s に、同じ文字が n 個以上連続している部分文字列を見つける
    """
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))  # カンマを取ると n 個ちょうどになる
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]
        
d = nchars(s, 2)
for d_ in d:
    n -= len(d_) - 1
print(n)
Problem p02900 (python)

Fixed submission:
from fractions import gcd
a,b = map(int,input().split())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
y = sorted(make_divisors(gcd(a,b)))
r = []
for i in y[1:]:
    y_y = make_divisors(i)
    f = True
    for j in y_y:
        if j in r:
            f = False
            break
    if f:
        r.append(i)
print(len(r)+1)

Buggy submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
y = sorted(make_divisors(math.gcd(a,b)))
r = []
for i in y[1:]:
    y_y = make_divisors(i)
    f = True
    for j in y_y:
        if j in r:
            f = False
            break
    if f:
        r.append(i)
print(len(r)+1)
Problem p02958 (python)

Fixed submission:
import numpy as np
import sys

n = int(input())
p = np.array(list(map(int, input().split())))
p_s = np.array(sorted(p))

if all(p==p_s):
    print("YES")
else:
    diff = p_s - p
    diff_index = np.where(diff!=0)
    #print(diff_index[0][1])
    if len(diff_index[0]) != 2:
        print("NO")
    else:
        p0 = p[diff_index[0][0]]
        p[diff_index[0][0]] = p[diff_index[0][1]]
        p[diff_index[0][1]] = p0
        if all(p == p_s):
            print("YES")
        else:
            print("NO")

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

n = int(input())
p = np.array(list(map(int, input().split())))
p_s = np.array(sort(p))

if all(p==p_s):
    print("YES")
else:
    diff = p_s - p
    diff_index = np.where(diff!=0)
    #print(diff_index[0][1])
    if len(diff_index[0]) != 2:
        print("NO")
    else:
        p0 = p[diff_index[0][0]]
        p[diff_index[0][0]] = p[diff_index[0][1]]
        p[diff_index[0][1]] = p0
        if all(p == p_s):
            print("YES")
        else:
            print("NO")
Problem p02971 (python)

Fixed submission:

n = int(input())
a = []

for i in range(n):
    a.append(int(input()))
    
a_copy = list(a)
a.sort(reverse=True)

max_1 = a[0]
max_count = a.count(max_1)

for i in a:
    if i < max_1:
        max_2 = i
        break
        
for a in a_copy:
    if a == max_1 and max_count == 1:
        print(max_2)
    else:
        print(max_1)

Buggy submission (verdict: Runtime Error):
n = int(input())
max_1 = None
max_2 = None

for i in range(n):
    a = int(input())
    if max_1 is None:
        max_i = [i]
        max_1 = a
    elif max_1 == a:
        max_i.append(i)
    elif max_2 < a:
        if max_1 < a:
            max_2 = max_1
            max_i = [i]
            max_1 = a
        else:
            max_2 = a
    
if len(max_i) >= 2:
    out_list = [max_1 for i in range(n)]
else:
    out_list = [max_1 for i in range(n)]
    out_list[max_i[0]] = max_2
    
print("\n".join(map(str, out_list)))

Buggy submission (verdict: Runtime Error):
import copy

n = int(input())
max_1 = None
max_2 = None

for i in range(n):
    a = int(input())
    if max_1 is None:
        max_i = [i]
        max_1 = a
    elif max_1 == a:
        max_i.append(i)
    elif max_2 < a:
        if max_1 < a:
            max_2 = max_1
            max_i = [i]
            max_1 = a
        else:
            max_2 = a
    
if len(max_i) >= 2:
    out_list = [max_1 for i in range(n)]
else:
    out_list = [max_1 for i in range(n)]
    out_list[max_i[0]] = max_2
    
print("\n".join(map(str, out_list)))

Buggy submission (verdict: Runtime Error):
import copy

n = int(input())
max_1 = None
max_2 = None

for i in range(n):
    a = int(input())
    if max_1 is None:
        max_i = [i]
        max_1 = a
    elif max_1 == a:
        max_i.append(i)
    elif max_1 < a:
        max_2 = max_1
        max_i = [i]
        max_1 = a
    elif max_2 < a:
        max_2 = a
    
if len(max_i) >= 2:
    out_list = [max_1 for i in range(n)]
else:
    out_list = [max_1 for i in range(n)]
    out_list[max_i[0]] = max_2
    
print("\n".join(map(str, out_list)))
Problem p03436 (python)

Fixed submission:
from collections import deque

qx = deque([])
qy = deque([])

nowx = 0
nowy = 0
tmpx = 0
tmpy = 0

ans = -1
ans2 = 0
cnt = 1
m = []

sx=[0,1,0,-1]
sy=[1,0,-1,0]
H,W = map(int, input().split())
for i in range(H):
    m.append(list(input()))
f = 0
p=[[999 for i in range(W)] for j in range(H)]

qx.append(nowx)
qy.append(nowy)
p[nowx][nowy]=0

while(len(qx) > 0 and f == 0):
    nowx = qx.popleft()
    nowy = qy.popleft()
    for i in range(4):
        tmpx = nowx + sx[i]
        tmpy = nowy + sy[i]
        if (tmpx < 0 or tmpx > W-1 or tmpy < 0 or tmpy > H-1):
            continue
        if (m[tmpy][tmpx] == '#'):
            continue
        if (tmpx == W-1 and tmpy == H-1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            ans = p[nowy][nowx]+1
            f = 1
            break
        if (p[tmpy][tmpx] > p[nowy][nowx]+1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            qx.append(tmpx)
            qy.append(tmpy)

if(ans == -1):
    ans2 = -1
else:
    ans2 = sum(x.count('.') for x in m) - ans -1 
print(ans2)

Buggy submission (verdict: Runtime Error):
from collections import deque
 
qx = deque([])
qy = deque([])
 
nowx = 0
nowy = 0
tmpx = 0
tmpy = 0
 
ans = -1
cnt = 1
m = []
 
sx=[0,1,0,-1]
sy=[1,0,-1,0]
H,W = map(int, input().split())
for i in range(H):
    m.append(list(input()))
f = 0
p=[[999 for i in range(W)] for j in range(H)]
 
qx.append(nowx)
qy.append(nowy)
p[nowx][nowy]=0
 
while(len(qx) > 0 and f == 0):
    nowx = qx.popleft()
    nowy = qy.popleft()
    for i in range(4):
        tmpx = nowx + sx[i]
        tmpy = nowy + sy[i]
        if (tmpx < 0 or tmpx > W-1 or tmpy < 0 or tmpy > H-1):
            continue
        if (m[tmpy][tmpx] == '#'):
            continue
        if (tmpx == W-1 and tmpy == H-1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            ans = p[nowy][nowx]+1
            f = 1
            break
        if (p[tmpy][tmpx] > p[nowy][nowx]+1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            qx.append(tmpx)
            qy.append(tmpy)
 
ans2 = sum(x.count('.') for x in m) - ans -1 
print(ans2)
 
from collections import deque

qx = deque([])
qy = deque([])

nowx = 0
nowy = 0
tmpx = 0
tmpy = 0

ans = 0
cnt = 1
m = []

sx=[0,1,0,-1]
sy=[1,0,-1,0]
H,W = map(int, input().split())
for i in range(H):
    m.append(list(input()))
f = 0
p=[[999 for i in range(W)] for j in range(H)]

qx.append(nowx)
qy.append(nowy)
p[nowx][nowy]=0

while(len(qx) > 0 and f == 0):
    nowx = qx.popleft()
    nowy = qy.popleft()
    for i in range(4):
        tmpx = nowx + sx[i]
        tmpy = nowy + sy[i]
        if (tmpx < 0 or tmpx > W-1 or tmpy < 0 or tmpy > H-1):
            continue
        if (m[tmpy][tmpx] == '#'):
            continue
        if (tmpx == W-1 and tmpy == H-1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            ans = p[nowy][nowx]+1
            f = 1
            break
        if (p[tmpy][tmpx] > p[nowy][nowx]+1):
            p[tmpy][tmpx] = p[nowy][nowx]+1
            qx.append(tmpx)
            qy.append(tmpy)

if(ans == -1):
    ans2 = -1
else:
    ans2 = sum(x.count('.') for x in m) - ans -1 
print(ans2)
Problem p03251 (python)

Fixed submission:

NMXY =  list(int(i) for i in input().split())
x =  list(int(i) for i in input().split())
y =  list(int(i) for i in input().split())

x.append(NMXY[2])

y.append(NMXY[3])

if max(x) < min(y):
    print('No War')
else:
    print('War')

Buggy submission (verdict: Runtime Error):
NMXY =  list(int(i) for i in input().split())
xy =  [[int(i) for i in input().split()] for i in range(NMAB[1])]

x = xy[0]
x.append(NMXY[2])
y = xy[1]
y.append(NMXY[3])
print(max(x))
print(min(y))
if max(x) < min(y):
    print('No War')
else:
    print('War')

Buggy submission (verdict: Runtime Error):

NMAB =  list(int(i) for i in input().split())
xy =  [[int(i) for i in input().split()] for i in range(NMAB[1])]

x = xy[0]
x.append(NMXY[2])
y = xy[1]
y.append(NMXY[3])
print(max(x))
print(min(y))
if max(x) < min(y):
    print('No War')
else:
    print('War')
Problem p03323 (python)

Fixed submission:

AB =  list(int(i) for i in input().split())

if AB[0] <= 8 and AB[1] <= 8:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):

A = int(input())
B = int(input())

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

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

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

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

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")
Problem p03370 (python)

Fixed submission:

m = []
NX = list(int(i) for i in input().split())
for i in range(NX[0]):
     m.append(int(input()))

weight0 = 0
for i in range(NX[0]):
    weight0 += m[i]
rest = NX[1] - weight0
minimumfood = min(m)
ans = int(rest/minimumfood) + NX[0]
print(ans)

Buggy submission (verdict: Runtime Error):

NX = list(int(i) for i in input().split())
for i in range(NX[0]):
     m.append(int(input()))

weight0 = 0
for i in range(NX[0]):
    weight0 += m[i]
rest = NX[1] - weight0
minimumfood = min(m)
ans = int(rest/minimumfood) + NX[0]
print(ans)
Problem p03385 (python)

Fixed submission:
SS = input()
S = (list(SS))
if "a" not in S:
    print("No")
else:
    if "b" not in S:
        print("No")
    else:
        if "c" not in S:
            print("No")
        else:
            print("Yes")

Buggy submission (verdict: Runtime Error):
SS = int(input())
S = (list(SS))
if "a" not in S:
    print("No")
else:
    if "b" not in S:
        print("No")
    else:
        if "c" not in S:
            print("No")
        else:
            print("Yes")

Buggy submission (verdict: Runtime Error):
SS = int(input())
"""
SS= "cba"
"""
print(list(S))

if "a" not in S:
    print("No")
else:
    if "b" not in S:
        print("No")
    else:
        if "c" not in S:
            print("No")
        else:
            print("Yes")
Problem p03399 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
train = [A,  B]
bus = [C, D]
ans = min(train) + min(bus)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(input())
    
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)
Problem p03400 (python)

Fixed submission:
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input())) 
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(input())


ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.apend(input())
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     a.apend(input())
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)
Problem p03447 (python)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())

c = x-a
d = c/b
e = x-a-int(d)*b
print(e)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(int(i) for i input().split())
b = list(int(i) for i input().split())

ans = 0
for n in range(N+1):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)

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

ans = 0
for i in range (a+1):
    for j in range (b+1):
        for k in range (c+1):
            if 500*i+100*j+50*k == x:
                ans += 1
print(ans)

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

c = x-a
d = c/b
e = x-a-int(d)*b
print(e)
Problem p03449 (python)

Fixed submission:
N = int(input())
a = list(int(i) for i in input().split())
b = list(int(i) for i in input().split())

ans = 0
for n in range(N+1):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(int(i) for i input().split())
b = list(int(i) for i input().split())

ans = 0
for n in range(N):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(input().space())
b = list(input.space())

ans = 0
for n in range(N):
    ap = a[:n]
    bp = b[n-1:]
    apsum = sum(ap)
    bpsum = sum(bp)
    s = apsum +bpsum
    if s > ans:
        ans = s
print(ans)
Problem p02848 (python)

Fixed submission:
alp = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
nalp = []
n = int(input())
str = input()
chars = list(str)

for i in range(len(chars)):
  num = alp.index(chars[i])
  if n+num>=26:
      num -= 26
  nalp.append(alp[n+num])

mojiretu = ''
 
for x in nalp:
    mojiretu += x
print(mojiretu)

Buggy submission (verdict: Runtime Error):
alp = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
nalp = []
n = int(input())
str = input()
chars = list(str)

for i in range(len(chars)):
  num = alp.index(chars[i])
  if n+num>26:
      num -= 26
  nalp.append(alp[n+num])

mojiretu = ' '
 
for x in nalp:
    mojiretu += x
print(mojiretu)
Problem p02909 (python)

Fixed submission:
a = input()
if a == "Sunny":
  print("Cloudy")
elif a == "Cloudy":
  print("Rainy")
else:
  print("Sunny")

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
list = [int(i) for i in input().split()]
while(m):
  num = list.index(max(list))
  m -= 1
print(sum(list))

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K, Q  = map(int, input().split())
score = np.zeros(N)
for i in range(Q):
  num = int(input())
  score[num] += 1

for i in range(N):
  if score[i] > Q-K:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
S = input()
str_list = [*S]
even_str = str_list[0::2]
odd_str = str_list[1::2]
if ("L" in even_str):
  print('No')
elif ("R" in odd_str):
  print('No')
else:
  print('Yes')
Problem p02910 (python)

Fixed submission:
S = input()
str_list = list(S)
odd_str = str_list[0::2]
even_str = str_list[1::2]
if ('R' in even_str):
  print('No')
elif ('L' in odd_str):
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
S = input()
str_list = [*S]
even_str = str_list[0::2]
odd_str = str_list[1::2]
if ('L' in even_str):
  print('No')
elif ('R' in odd_str):
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
S = input()
str_list = [*S]
even_str = str_list[0::2]
odd_str = str_list[1::2]
if ("L" in even_str):
  print("No")
elif ("R" in odd_str):
  print("No")
else:
  print("Yes")
Problem p02911 (python)

Fixed submission:
import numpy as np
N, K, Q  = map(int, input().split())
score = np.zeros(N)
for i in range(Q):
  num = int(input())
  score[num-1] += 1

for i in range(N):
  if score[i] > Q-K:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K, Q  = map(int, input().split())
score = np.zeros(N)
for i in range(Q):
  num = int(input())
  score[num] += 1

for i in range(N):
  if score[i] > Q-K:
    print('Yes')
  else:
    print('No')