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

Fixed submission:
a, b, m = input().split()
a, b, m = int(a), int(b), int(m)
a_values = input().split()
b_values = input().split()
m_values = {}
for i in range(m):
    m_values[i] = input().split()

min_num = int(a_values[int(m_values[0][0]) - 1]) + int(b_values[int(m_values[0][1]) - 1]) - int(m_values[0][2])
for i in range(1, m):
    now = int(a_values[int(m_values[i][0]) - 1]) + int(b_values[int(m_values[i][1]) - 1]) - int(m_values[i][2])
    if min_num > now:
        min_num = now
now = int(min(a_values)) + int(min(b_values))
if min_num > now:
    print(now)
else:
    print(min_num)

Buggy submission (verdict: Runtime Error):
a, b, m = input().split()
a, b, m = int(a), int(b), int(m)
a_values = input().split()
b_values = input().split()
m_values = {}
for i in range(m):
    m_values[i] = input().split()

min = int(a_values[int(m_values[0][0])-1]) + int(b_values[int(m_values[0][1])-1]) - int(m_values[0][2])
for i in range(1, m):
    now = int(a_values[int(m_values[i][0])-1]) + int(b_values[int(m_values[i][1])-1]) - int(m_values[i][2])
    if min > now:
        min = now
now = int(min(a_values)) + int(min(b_values))
if min > now:
  print(now)
else:
  print(min)

Buggy submission (verdict: Runtime Error):
a, b, m = input().split()
a, b, m = int(a), int(b), int(m)
a_values = input().split()
b_values = input().split()
m_values = {}
for i in range(m):
  m[i] = input().split()

min = int(a_values[m[0][0]]) + int(b_values[m[0][1]]) - int(m[0][2])
for i in range(1, m):
  now = int(a_values[m[i][0]]) + int(b_values[m[i][1]]) - int(m[i][2])
  if min > now:
    min = now
print(min)
Problem p02921 (python)

Fixed submission:
s = input("")
t = input("")
s_list = list(s)
t_list = list(t)
n = 0

for i in range(3):
    if s_list[i] == t_list[i]:
        n += 1

print(n)

Buggy submission (verdict: Runtime Error):
s = input("")                                                                                                           t = input("")                                                                                                           s_list = list(s)                                                                                                        t_list = list(t)                                                                                                        n = 0                                                                                                                                                                                                                                           for i in range(3):                                                                                                          if s_list[i] == t_list[i]:                                                                                                  n += 1                                                                                                                                                                                                                                  print(n)  s = input("")                                                                                                           t = input("")                                                                                                           s_list = list(s)                                                                                                        t_list = list(t)                                                                                                        n = 0                                                                                                                                                                                                                                           for i in range(3):                                                                                                          if s_list[i] == t_list[i]:                                                                                                  n += 1                                                                                                                                                                                                                                  print(n)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = input("")
t = input("")
s_list = list(s)
t_list = list(t)
n = 0

for i in range(3):
  if s_list.get(i) = t_list.get(i):
    n += 1
print(n)
Problem p02657 (python)

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

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

print(a*b)
Problem p02658 (python)

Fixed submission:
import sys
n = int(input())
a = list(map(int, input().split()))

total = 1
a.sort()
if a[0] == 0:
	print(0)
	sys.exit()
for i in range(n):
	total *= a[i]
	if total > 10**18:
		print('-1')
		sys.exit()
print(total)

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

total = 1
a.sort()
if a[0] == 0:
	print(0)
	sys.exit(1)
for i in range(n):
	total *= a[i]
	if total > 10**18:
		print('-1')
		sys.exit(1)
print(total)

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

total = 1
for i in range(n):
	if a[i] == 0:
		print(-1)
		sys.exit(1)
for i in range(n):
	total = total * a[i]
	if total > 10**18:
		print(-1)
		sys.exit(1)
print(total)

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

total = 1
for i in range(n):
	if a[i] == 0:
		print(0)
		sys.exit(1)
for i in range(n):
	total = total * a[i]
	if total > 10**18:
		print(-1)
		sys.exit(1)
print(total)

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

sum = 1
for i in range(n):
	if a[i] == 0:
		print(0)
		sys.exit(1)
for i in range(n):
	sum = sum * a[i]
	if sum > 10**18:
		print(-1)
		sys.exit(1)
print(sum)
Problem p02664 (python)

Fixed submission:
t = input()
le = len(t)
tt = []
for i in range(le):
    c = t[i]
    if t[i] == '?':
        c = 'D'
        if i > 0 and tt[i - 1] == 'P':
            c = 'D'
        elif i == 0 and le > 1 and t[i + 1] == 'D' or i == 0 and le > 1 and t[i + 1] == '?':
            c = 'P'
        elif i < le - 1 and t[i + 1] == 'D' or i < le - 1 and t[i + 1] == '?':
            c = 'P'
    tt.append(c)
print(''.join(tt))

Buggy submission (verdict: Runtime Error):
t = input()
tt = ''
for i in range(len(t)):
    c = t[i]
    if t[i] == '?':
        c = 'D'
        if i > 0 and t[i - 1] == 'P':
            c = 'D'
        elif i == 0 and t[i + 1] == 'D' or i == 0 and t[i + 1] == '?':
            c = 'P'
        elif i < len(t) - 1 and t[i + 1] == 'D' or i < len(t) - 1 and t[i + 1] == '?':
            c = 'P'
    t = t[:i] + c + t[i + 1:]
print(t)
Problem p02683 (python)

Fixed submission:
n, m, x = map(int,input().split(' '))
a = [[] for i in range(n)]
p = 0
for i in range(n):
    a[i] = list(map(int, input().split(' ')))
sc = 12 * 100001
for i in range(1, 2 ** n):
    bi = '0' * n + bin(i)[2:]
    bi = bi[len(bi) - n:]
    cc = 0
    e = [0] * m
    for j in range(n):
        if bi[j] == '1':
            for k in range(m):
                e[k] += a[j][k + 1]
            cc += a[j][0]
    su =True
    for j in range(m):
        su &= e[j] >= x
    if su:
        sc = min(sc, cc)
sc = -1 if sc > 12 * 100000 else sc
print(sc)

Buggy submission (verdict: Runtime Error):
n, m, x = map(int,input().split(' '))
a = [[] for i in range(n)]
e = [0] * m
sc = [0] * m
for i in range(n):
    l = list(map(int, input().split(' ')))
    l.append(l[0] / sum(l[1:]))
    a[i] = l
a.sort(key = lambda v : v[-1:])
p = 0
for i in a:
    p += i[0]
    for j in range(m):
        e[j] += i[j + 1]
        sc[j] = 1 if e[j] >= x else 0
    if sum(sc) == m:
        break
        
    
r = p if sum(sc) == m else -1
print(r)
Problem p02742 (python)

Fixed submission:
h, w = map(int, input().split(' '))
print(int(h * w / 2) + h * w % 2 if h > 1 and w > 1 else 1)

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split(' '))
print(int(h * w / 2 + h * w % 2)
Problem p02618 (python)

Fixed submission:
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26

def score_down(d):
    ans = 0
    for i in range(26):
        ans += c[i]*(d - last[i])
    return ans

for d in range(D):
    score = [(s[d][i] - score_down(d+1)) for i in range(26)]
    t = score.index(max(score))
    print(t+1)
    last[t] = d+1

Buggy submission (verdict: Runtime Error):
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26

def score_down(d):
    ans = 0
    for i in range(26):
        ans += c[i]*(d - last[i])
    return ans

for d in range(D):
    score = [(s[d][i] - score_down(d+1)) for i in range(D)]
    t = score.index(max(score))
    print(t+1)
    last[t] = d+1

Buggy submission (verdict: Runtime Error):
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26

def score_down(d):
    ans = 0
    for i in range(26):
        ans += c[i]*(d - last[i])
    return ans

for d in range(D):
    score = [(s[d][i] - score_down(d)) for i in range(D)]
    t = score.index(max(score))
    print(t+1)
    last[t] = d+1

Buggy submission (verdict: Runtime Error):
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26

def score_down(d):
    ans = 0
    for i in range(26):
        ans += c[i]*(d - last[i])
    return ans

for d in range(D):
    score = [(s[d][i] - score_down(d)) for i in range(D)]
    t = score.index(max(score))
    print(t+1)
    last[t] = d
Problem p02641 (python)

Fixed submission:
X, N = map(int,input().split())
if N == 0:
    print(X)
    exit()
else:
    P = list(map(int,input().split()))
L = [i for i in range(0,102) if i not in P]

if X in L:
    ANS = X
else:
    L.append(X)
    L = sorted(L)
    n = L.index(X)
    l = len(L) - 1


    if (0 < n < l):
        if (L[n+1]-L[n] < L[n] - L[n-1]):
            ANS = L[n+1]
        else:
            ANS = L[n - 1]
    elif (n == l):
        ANS = L[l - 1]

print(ANS)

Buggy submission (verdict: Runtime Error):
X, N = map(int,input().split())
if N == 0:
    print(X)
    exit()
else:
    P = list(map(int,input().split()))
L = [i for i in range(0,101) if i not in P]

if X in L:
    ANS = X
else:
    L.append(X)
    L = sorted(L)
    n = L.index(X)
    l = len(L) - 1


    if (0 < n < l):
        if (L[n+1]-L[n] < L[n] - L[n-1]):
            ANS = L[n+1]
        else:
            ANS = L[n - 1]


print(ANS)

Buggy submission (verdict: Runtime Error):
X, N = map(int,input().split())
if N == 0:
    print(X)
    exit()
else:
    P = list(map(int,input().split()))
L = [i for i in range(0,101) if i not in P]

if X in L:
    ANS = X
else:
    L.append(X)
    L = sorted(L)
    n = L.index(X)
    l = len(L) - 1


    if (0 < n < l):
        if (L[n+1]-L[n] < L[n] - L[n-1]):
            ANS = L[n+1]
        else:
            ANS = L[n - 1]

print(ANS)

Buggy submission (verdict: Runtime Error):
X, N = map(int,input().split())
if N == 0:
    print(X)
    exit()
else:
    P = list(map(int,input().split()))
L = [i for i in range(0,101) if i not in P]

if X in L:
    ANS = X
else:
    L.append(X)
    L = sorted(L)
    n = L.index(X)
    l = len(L)

    if (0 < n < l):
        if (L[n+1]-L[n] < L[n] - L[n-1]):
            ANS = L[n+1]
        else:
            ANS = L[n - 1]
    elif (n == 0):
        ANS = L[1]
    elif (n == l):
        ANS = L[l - 1]

print(ANS)

Buggy submission (verdict: Runtime Error):
X, N = map(int,input().split())
if N == 0:
    print(X)
    exit()
else:
    P = list(map(int,input().split()))
L = [i for i in range(-1,100) if i not in P]


if X in L:
    ANS = X
else:
    L.append(X)
    L = sorted(L)
    n = L.index(X)
    l = len(L)

    if (0 < n < l):
        if (L[n+1]-L[n] < L[n] - L[n-1]):
            ANS = L[n+1]
        else:
            ANS = L[n - 1]
    elif (n == 0):
        ANS = L[1]
    elif (n == l):
        ANS = L[l - 1]

print(ANS)

Buggy submission (verdict: Runtime Error):
X, N = map(int,input().split())
if N == 0:
    print(X)
    exit()
else:
    P = list(map(int,input().split()))
L = [i for i in range(1,100) if i not in P]


if X in L:
    ANS = X
else:
    L.append(X)
    L = sorted(L)
    n = L.index(X)
    l = len(L)

    if (0 < n < l):
        if (L[n+1]-L[n] < L[n] - L[n-1]):
            ANS = L[n+1]
        else:
            ANS = L[n - 1]
    elif (n == 0):
        ANS = L[1]
    elif (n == l):
        ANS = L[l - 1]

print(ANS)
Problem p02678 (python)

Fixed submission:
from collections import deque
N, M = map(int, input().split())
G = [[] for _ in range(N+1)]

for i in range(M):
    x, y = map(int, input().split())
    G[x].append(y)
    G[y].append(x)

USED = [-1] * (N+1)
USED[0] = 0
USED[1] = 0

Q = deque()
Q.append(1)

while Q:
    x = Q.pop()
    for t in G[x]:
        if USED[t] == -1:
            Q.appendleft(t)
            USED[t] = x

if -1 in USED:
    print("No")
else:
    print("Yes")
    for _ in USED[2::]:
        print(_)

Buggy submission (verdict: Runtime Error):
from collections import deque
N, M = map(int, input().split())
G = [[] for _ in range(N+1)]

for i in range(M):
    x, y = map(int, input().split())
    G[x].append(y)
    G[y].append(x)

USED = [-1] * (N+1)
USED[0] = 0
USED[1] = 0

Q = deque()
Q.append(1)

while Q:
    x = Q.pop()
    for t in G[x]:
        if USED[t] == -1:
            Q.appendleft(t)
            USED[t] = x

if -1 in USED:
    print("No")
else:
    print("Yes")
    print(*USE[2:])
Problem p02681 (python)

Fixed submission:
S = input()
T = input()
ans = 0
for i in range(len(S)):
    if len(S) > 10:
        break
    if len(T) != len(S) + 1:
        break
    if S[i] == T[i]:
        ans = 1
    else:
        ans = 0
        break

if ans == 1:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
ans = 0
for i in range(len(T)):
    if len(S) > 10:
        break
    if S[i] == T[i]:
        ans = 0
    else:
        ans = 1

if ans == 0:
    print('Yes')
else:
    print('No')
Problem p02684 (python)

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split())) #どこに行くかのリスト
now = 0 #どこにいるか
LOG = {}
roop = 0
count = 0

while now not in LOG and count < K:
    LOG.setdefault(now, count)
    now = A[now] -  1
    count += 1

if count < K:
    roop = len(LOG) - LOG[now]
    K = (K - count) % roop
    count = 0
    while count < K:
        now = A[now] -  1
        count += 1

print(now+1) #行った場所を保存

Buggy submission (verdict: Runtime Error):
6 727202214173249351
6 5 2 5 3 2
Problem p03493 (python)

Fixed submission:
a, b, c=input()
ans = 0
if a == "1":
    ans += 1
if b == "1":
    ans += 1
if c == "1":
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A =  list(map(int, input().split()))
count = 0
flag = 0

while flag == 0:
    for i in range(N):
        if (A[i] % 2 == 0):
            A[i] = A[i] / 2
        else:
            flag = 1
    count += 1

print(count - 1)
Problem p04044 (python)

Fixed submission:
N, L = map(int, input().split())
S = []
for _ in range(N):
    S.append(input())

S.sort()
print(''.join(S))

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

S.sort()
print()''.join(S))
Problem p02761 (python)

Fixed submission:
n, m = [int(i) for i in input().split(' ')]
c_list = []
for i in range(m):
    c_list.append([int(i) for i in input().split(' ')])
number = [-1 for i in range(n)]
for line in c_list:
    if number[line[0] - 1] == -1:
        number[line[0] - 1] = line[1]
    else:
        if number[line[0] - 1] == line[1]:
            continue
        else:
            print("-1")
            break
else:
    if number[0] == 0:
        if len(number) != 1:
            print("-1")
        else:
            print("0")
    else:
        for i, index in enumerate(number):
            if index == -1:
                if i == 0 and len(number) != 1:
                    index = 1
                else:
                    index = 0
            print(index, end="")

Buggy submission (verdict: Runtime Error):
n, m = [int(i) for i in input().split(' ')]
c_list = []
for i in range(m):
    c_list.append([int(i) for i in input().split(' ')])
number = [-1 for i in range(n)]
for line in c_list:
    if number[line[0] - 1] == -1:
        number[line[0] - 1] = line[1]
    else:
        if number[line[0] - 1] == line[1]:
            continue
        else:
            print("-1")
            break
else:
    if number[0] == 0 and len(number) != 1:
        print("-1")
    else:
        for i, index in enumerator(number):
            if index == -1:
                if i == 0:
                    index = 1
                else:
                    index = 0
            print(index, end="")

Buggy submission (verdict: Runtime Error):
n, m = [int(i) for i in input().split(' ')]
c_list = []
for i in range(m):
    c_list.append([int(i) for i in input().split(' ')])
number = [-1 for i in range(n)]
for line in c_list:
    if number[line[0] - 1] == -1:
        number[line[0] - 1] = line[1]
    else:
        if number[line[0] - 1] == line[1]:
            continue
        else:
            print("-1")
            break
else:
    if number[0] == 0 and len(number) != 1:
        print("-1")
    else:
        for i, index in enumrator(number):
            if index == -1:
                if i == 0:
                    index = 1
                else:
                    index = 0
            print(index, end="")
Problem p02818 (python)

Fixed submission:
a, b, k = [int(i) for i in input().split(' ')]
if(k>a):
    k -= a
    a = 0
    if(k>b):
        b = 0
    else:
        b -= k
else:
    a -= k
print(str(a) + ' ' + str(b))

Buggy submission (verdict: Runtime Error):
a, b, k = [int(i) for i in input().split(' ')]
if(k>a):
    k -= a
    a = 0
    if(k>b):
        b = 0
    else:
        b -= k
print(f'{a} {b}')
Problem p03060 (python)

Fixed submission:
n = int(input())
list_v = list(map(int, input().split()))
list_c = list(map(int, input().split()))

max_value = 0

for i in range(n):
    if list_v[i]>list_c[i]:
        max_value = max_value + (list_v[i]-list_c[i])

print(max_value)

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

max_value = 0

for i in range(n):
    if list_v[i]>list_c[i]:
        max_value = max_value + (list_v[i]-list_c[i])
        
print(max_value)
Problem p03478 (python)

Fixed submission:
n,a,b = map(int,input().split())
s = 0
for i in range(n):
    x = sum(list(map(int,str(i+1))))
    if a <= x and x <= b:
        s += i+1
print(s)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int(input().split()))
s = 0
for i in range(n):
    x = sum(list(map(int,str(i).split())))
    if a <= x and x <= b:
        s += x
print(s)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int(input().split()))
s = 0
for i in range(n):
    x = sum(list(map(int,str(i).split())))
    if a <= x && x <= b:
        s += x
print(s)
Problem p03494 (python)

Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
m = 0
b = True
while(b):
  for index,l in enumerate(lis):
    if l % 2 == 1:
      b = False
      m -= 1
      break
    else:
      lis[index] = l / 2
  m += 1
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
lis = map(int,input().split())
m = 0
b = True
while(b):
  for index,l in enumerate(lis):
    if l % 2 == 1:
      b = False
      m -= 1
      break
    else:
      lis[index] = l // 2
  m += 1
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
lis = map(long,input().split())
m = 0
b = True
while(b):
  for index,l in enumerate(lis):
    if l % 2 == 1:
      b = False
      m -= 1
      break
    else:
      lis[index] = l // 2
  m += 1
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = 0
b = True
lis = map(long,input().split())
while(b):
  for index,l in enumrate(lis):
    if l % 2 == 1:
      b = False
      m -= 1
      break
    else:
      lis[index] = l // 2
  m += 1
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = 0
b = True
lis = map(long,input().split())
while(b):
  for index,l in enumrate(lis):
    if l % 2 == 1:
      b = False
      m -= 1
      break
    else:
      lis[index] = l // 2
  m += 1

Buggy submission (verdict: Runtime Error):
n = int(input())
n = 0
b = True
lis = map(long,input().split())
while(b):
  for index,l in enumrate(lis):
    if l % 2 == 1:
      b = False
      n--
      break
    else:
      lis[index] = l // 2
  n++

Buggy submission (verdict: Runtime Error):
n = int(input())
m = 0
lis = map(long,input().split())
while(1)
  for l in lis:
  	if l % 2 == 1:
      return(m)
    else:
      l = l // 2
  m++

Buggy submission (verdict: Runtime Error):
n = int(input())
n= 0
lis = map(int,input().split())
while(1)
  for l in lis:
  	if l % 2 == 1:
      return(n)
    else:
      l /= 2
  n++
Problem p02999 (python)

Fixed submission:
x,a  = [int(e) for e in input().split()]
if x < a:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
x,a  = [int(e) for e in input().split()]
if x < a:
  return 0
else:
  return 10
Problem p03032 (python)

Fixed submission:
n, k = map(int, input().split())
lst = list(map(int, input().split()))
res = []
for i in range(min(k, len(lst))):
  throwaways = i
  take = min(k - throwaways, len(lst))
  # throwaways cannot be larger than take
  if throwaways > take:
    break
  for j in range(take+1):
    right = lst[:j]
    if len(right) < take:
      l = take - len(right)
      left = lst[l*-1:]
    else:
      left = []
    m_lst = sorted(right + left)
    for t in range(throwaways):
      # throw away if it's value is negative
      if m_lst[0] < 0:
        del m_lst[0]
    res.append(m_lst)
max_num = max([sum(e) for e in res])
if max_num <= 0:
  print(0)
else:
  print(max_num)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
lst = list(map(int, input().split()))
res = []
for i in range(k):
  throwaways = i
  take = k - throwaways
  # throwaways cannot be larger than take
  if throwaways > take:
    break
  for j in range(take+1):
    right = lst[:j]
    if len(right) < take:
      l = take - len(right)
      left = lst[l*-1:]
    else:
      left = []
    m_lst = sorted(right + left)
    for t in range(throwaways):
      del m_lst[0]
    res.append(m_lst)
max_num = max([sum(e) for e in res])
if max_num <= 0:
  print(0)
else:
  print(max_num)
Problem p03037 (python)

Fixed submission:
n,m = map(int, input().split())
l_lst, r_lst = [], []
for i in range(m):
  l,r = map(int, input().split())
  l_lst.append(l)
  r_lst.append(r)
res = min(r_lst)-max(l_lst)+1
if res > 0:
  print(res)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
l_lst, r_lst = [], []
for i in range(m):
  l,r = map(int, input().split())
  l_lst.append(l)
  r_lst.append(r)
res = min(r_lst)-max(l_lst)+1
if res > 0:
  print(res)
else:
  print(0)
Problem p03079 (python)

Fixed submission:
A,B,C = input().split()
if A == B == C:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
A,B,C = input()
if A == B == C:
  print('Yes')
else:
  print('No')
Problem p03080 (python)

Fixed submission:
n = input()
s = input()
R = len([e for e in s if e == 'R'])
B = len(s) - R
if R > B:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = input()
s = input()
R = len([e for e in s if e == 'R'])
B = len(s) - R
if R > B:
  return 'Yes'
else:
  return 'No'
Problem p03219 (python)

Fixed submission:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
 
x, y = na()
print(x+y//2)

Buggy submission (verdict: Runtime Error):
x = int(raw_input())
y = int(raw_input())
print x+y/2

Buggy submission (verdict: Runtime Error):
x = int(raw_input())
y = int(raw_input())
print(x+y/2)