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

Fixed submission:
n = int(input())
word = str(input())

num = int(n / 2)
if word[:num] == word[num:] :
	print("Yes")
else :
	print("No")

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

num = int(n / 2)
if word[:num] == word[num:] :
	print("Yes")
else :
	print("No")

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

num = int(n / 2)
if word[:num] == word[num:] :
 print("Yes")
else :
 print("No")

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

num = int(n / 2)
if word[:num] == word[num:] :
 print("Yes")
else :
 print("No")

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

num = int(n / 2)
if word[:num] == word[num:] :
    print("Yes")
else : 
  	print("No")
Problem p02847 (python)

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

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

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

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
for i in range (n):
    if(a[i]>=b[i]):
        ans+=b[i]
    elif(a[i+1]<b[i]-a[i])
        ans+=a[i]+a[i+1]
        a[i+1]=0
    else:
        ans+=b[i]
        a[i+1]-=b[i]-a[i]
print(ans)
Problem p02987 (python)

Fixed submission:
S=input()
if (S[0]==S[1] and S[2]==S[3]) or (S[0]==S[2] and S[1]==S[3]) or (S[0]==S[3] and S[1]==S[2]):
    if S[0]==S[1]==S[2]==S[3]:
        print('No')
    else:
        print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
S=input()
if (S[0]==S[1] and S[2]==s[3]) or (S[0]==S[2] and S[1]==S[3]) or (S[0]==S[3] and S[1]==S[2]):
    print('Yes')
else:
    print('No')
Problem p03072 (python)

Fixed submission:
N=int(input())
H=[int(x) for x in input().split()]
cnt=1
tall=H[0]
for i in range(1,N):
    if tall<=H[i]:
        tall=H[i]
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
N=int(input())
H=[int(x) for x in input().split()]
cnt=1
tall=H[0]
for i in range(1,n):
    if tall<=H[i]:
        tall=H[i]
        cnt+=1
print(cnt)
Problem p03834 (python)

Fixed submission:
s=str(input())
print(s.replace(',',' '))

Buggy submission (verdict: Runtime Error):
a,b,c=map(str,input.split())
print('a'+ 'b'+ 'c')
Problem p03038 (python)

Fixed submission:
N, M = [int(s) for s in input().split(' ')]
As = [int(s) for s in input().split(' ')]
CBs = []
for m in range(M):
    B, C = [int(s) for s in input().split(' ')]
    CBs.append((C, B))
As.sort(reverse=True)
CBs.sort(reverse=True)
CBs.append((0, 0))
ret = 0
a = 0
bc = 0
n = 0
while n < N:
    C, B = CBs[bc]
    if As[a] < C:
        bc += 1
        pick = min(N - n, B)
        ret += pick * C
        n += pick
    else:
        ret += As[a]
        a += 1
        n += 1
print(ret)

Buggy submission (verdict: Runtime Error):
N, M = [int(s) for s in input().split(' ')]
As = [int(s) for s in input().split(' ')]
CBs = []
for m in range(M):
    B, C = [int(s) for s in input().split(' ')]
    CBs.append((C, B))
As.sort(reverse=True)
CBs.sort(reverse=True)
ret = 0
a = 0
bc = 0
n = 0
while n < N:
    C, B = CBs[bc]
    if As[a] < C:
        bc += 1
        pick = min(N - n, B)
        ret += pick * C
        n += pick
    else:
        ret += As[a]
        a += 1
        n += 1
print(ret)
Problem p03307 (python)

Fixed submission:
import fractions

line = raw_input()
n = int(line)
ret = 2 * n / fractions.gcd(2, n)
print ret

Buggy submission (verdict: Runtime Error):
from math import gcd

line = input()
n = int(line)
ret = 2 * n // gcd(2, n)
print(ret)
Problem p03072 (python)

Fixed submission:
input()
ms=[int(i) for i in input().split()]
c=d=0
for m in ms:
 if c<=m:
  c=m
  d+=1
print(d)

Buggy submission (verdict: Runtime Error):
input()
ms=[int(i) for i in input().split()]
c=0
for m in ms:
 if m<=c:
  c=m
  d+=1
print(d)

Buggy submission (verdict: Runtime Error):
input()
ms=[int(i) for i in input().split()]
c=0
=0
for m in ms:
 if m<=c:
  c=m
  d+=1
print(d)

Buggy submission (verdict: Runtime Error):
    input()
    ms=[int(i) for i in input().split()]
    c=0
    d=0
    for m in ms:
      if m<=c:
        c=m
        d+=1
    print(d)

Buggy submission (verdict: Runtime Error):
input()
ms=input().split()
c=0
d=0
for m in ms:
  if m<=c:
    c=m
    d+=1
print(d)
Problem p02779 (python)

Fixed submission:
N = int(input())
An = list(map(int, input().split()))
Bn = sorted(An)

y = -1
count = 0
for x in Bn:
    if x == y:
        count += 1
    y = x

if count == 0:
    print("YES")
else:
    print("NO")

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

duplicate_list = [x for x in set(An) if An.count(x) > 1]

if duplicate_list:
    print('NO')
else:
    print('YES'
Problem p02847 (python)

Fixed submission:
days = ['SUN','MON','TUE','WED','THU','FRI','SAT']

S = input()

print(7 - days.index(S))

Buggy submission (verdict: Runtime Error):
def m_d(n):
  return int(len(str(n)))
def m_N(A,B,n):
  return int((A * n) + (B * m_d(n)))
A,B,X = map(int,input().split())
l = 0
m = 10**9+1
while m-l>1:
  n=(l+m)//2
  if m_N(A,B,n)<=X:
    l=n
  else:
    m=n
print(l)
Problem p03250 (python)

Fixed submission:
a,b,c=sorted(map(int,input().split()))
print(10*c+b+a)

Buggy submission (verdict: Runtime Error):
a,b,c=sorted(map(int,input()))
print(10*c+b+a)
Problem p03011 (python)

Fixed submission:
# coding: utf-8

p, q, r = [int(x) for x in input().rstrip().split(" ")]

s = [0, 0, 0]
s[0] = p + q
s[1] = q + r
s[2] = r + p

print(min(s))

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

p, q, r = [int(x) for x in input().rstrip().split(" ")]

s = []
s[0] = p + q
s[1] = q + r
s[2] = r + p

print(min(s))
Problem p03055 (python)

Fixed submission:
import sys
from collections import deque

def ni():
    return int(sys.stdin.readline())


def nia():
    data = sys.stdin.readline().split(' ')
    return [int(g) for g in data]

n = ni()
graph = []
for i in range(0, n):
    graph.append([])

for i in range(1, n):
    a, b = nia()
    a = a - 1
    b = b - 1

    graph[a].append(b)
    graph[b].append(a)


q = deque()
q.append(0)
visited = set()
visited.add(0)
last = 0
while q:
    n = q.popleft()
    last = n
    for nb in graph[n]:
        if nb not in visited:
            visited.add(nb)
            q.append(nb)

diam = 0
visited = set()
next = [(last, 0)]
while next:
    ind, x = next.pop()
    diam = max(diam, x)
    for nb in graph[ind]:
        if nb not in visited:
            visited.add(nb)
            next.append((nb, x + 1))

if (diam + 1) % 3 == 2:
    print 'Second'
else:
    print 'First'

Buggy submission (verdict: Runtime Error):
import sys
import queue

def ni():
    return int(sys.stdin.readline())


def nia():
    data = sys.stdin.readline().split(' ')
    return [int(g) for g in data]


n = ni()
graph = []
for i in range(0, n):
    graph.append([])

for i in range(1, n):
    a, b = nia()
    a = a - 1
    b = b - 1

    graph[a].append(b)
    graph[b].append(a)


q = queue.Queue()
q.put(0)
visited = set()
visited.add(0)
last = 0
while not q.empty():
    n = q.get()
    last = n
    for nb in graph[n]:
        if nb not in visited:
            visited.add(nb)
            q.put(nb)

diam = 0
visited = set()
next = [(last, 0)]
while next:
    ind, x = next.pop()
    diam = max(diam, x)
    for nb in graph[ind]:
        if nb not in visited:
            visited.add(nb)
            next.append((nb, x + 1))


if (diam + 1) % 3 == 2:
    print 'Second'
else:
    print 'First'
Problem p02859 (python)

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

Buggy submission (verdict: Runtime Error):
import math

r = int(input('整数r(1<=r<=100)を入力 >>')
arear = r * r * math.pi
area1 = 1 * 1 * math.pi

nanbai = arear / area1
print('半径{}の円の面積は半径1の円の面積の{}倍です',r,nanbai)
Problem p02777 (python)

Fixed submission:
S, T = input().split()
A, B = map(int, input().split())
U = input()
 
if S == U :
  print(str(A - 1) + ' ' + str(B))
elif T == U :
  print(str(A) + ' ' + str(B - 1))

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

if S == U :
  print(A - 1)
elif T == U :
  print(B - 1)

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

if S == U :
  print(A - 1)
elif T == U :
  print(B - 1)

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

if(S == U):
  print(A - 1)
elif(T == U):
  print(B - 1)

Buggy submission (verdict: Runtime Error):
S = input('S>')
T = input('T>')
A = int(input('A>'))
B = int(input('B>'))
U = input('U>')

if(U == S):
  print(A-1)
elif(T == U):
  print(B-1)
Problem p02777 (python)

Fixed submission:
s,t=map(str,input().split())
a,b=map(int,input().split())
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

Buggy submission (verdict: Runtime Error):
p,q,r=map(int,input().split())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)

Buggy submission (verdict: Runtime Error):
p,q,r=map(int,input().split())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)

Buggy submission (verdict: Runtime Error):
p,q,r=map(int,input().split())
if p>=q and  p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(p+q)

Buggy submission (verdict: Runtime Error):
p,q,r=map(int,input().split())
if p>=q and  p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(p+q)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
a,b=map(int,input().split())
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
a,b=map(int,input().split())
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
u=input()
a,b=map(int,input().split())
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s,t,u=map(input().split())
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)

Buggy submission (verdict: Runtime Error):
a=int(input())
s=input()
b=int(input())
t=input()
u=input()
if u==s:
    print(a-1,b)
if u==t:
    print(a,b-1)
Problem p03011 (python)

Fixed submission:
p,q,r=map(int,input().split())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)

Buggy submission (verdict: Runtime Error):
p=int(input())
q=int(input())
r=int(input())
if p+q<q+r and p+q<p+r:
    print(p+q)
if p+r<p+q and p+r<q+r:
    print(p+r)
if q+r<p+r and q+r<p+q:
    print(q+r)

Buggy submission (verdict: Runtime Error):
p=int(input())
q=int(input())
r=int(input())
if p+q<q+r and p+q<p+r:
    print(p+q)
if p+r<p+q and p+r<q+r:
    print(p+r)
else:
    print(q+r)

Buggy submission (verdict: Runtime Error):
p=int(input())
q=int(input())
r=int(input())
if p+q<q+r and p+q<p+r:
    print(p+q)
if q+r<p+q and p+r<q+r:
    print(p+r)
else:
    print(q+r)

Buggy submission (verdict: Runtime Error):
p=int(input())
q=int(input())
r=int(input())
if p+q<q+r and p+q<p+r:
    print(p+q)
else:
    print(q+r)

Buggy submission (verdict: Runtime Error):
p=int(input())
q=int(input())
r=int(input())
if p+q<q+r and p+q<p+r:
    print(p+q)

else:
    print(q+r)
Problem p03072 (python)

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    if Hs[i] == max(Hs[0:i+1]):
        ret += 1

print(ret)

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    if Hs[i] == max(Hs[0:i+1]):
        ret += 1

print(ret)

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    if Hs[i] == max(0:i+1):
        ret += 1

print(ret)

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    elif Hs[i] == max(0:i+1):
        ret += 1

print(ret)
Problem p03077 (python)

Fixed submission:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

num = N

if num >= A:
    num = A 

if num >= B:
    num = B

if num >= C:
    num = C

if num >= D:
    num = D

if num >= E:
    num = E

if N % num == 0:
    print(N // num + 4)
else:
    print(N // num + 5)

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

num = A

if num >= B:
    num = B
else:
    continue

if num >= C:
    num = C
else: 
    continue

if num >= D:
    num = D
else: 
    continue

if num >= E:
    num = E
else: 
    continue

if N % num == 0:
    print(N // num + 4)
else:
    print((N + 1) // num + 4)
Problem p02785 (python)

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

h.sort(reverse = True)
print(sum(h[k::]))

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

h.sort(reverse = True)
for i in range(k-1):
    h[i] = 0
print(sum(h))
Problem p02829 (python)

Fixed submission:
a = int(input())
b = int(input())
c = a + b
print(6-c)

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

if c == 3:
    print("3")
elif c == 4:
    print("2")
elif c == 5:
    print*("1")
Problem p02831 (python)

Fixed submission:
import fractions
a, b = map(int,input().split())
ans = (a * b) / fractions.gcd(a,b)
print(int(ans))

Buggy submission (verdict: Runtime Error):
import math
a, b = map(int,input().split())
ans = (a * b) / math.gcd(a,b)
print(int(ans))
Problem p02859 (python)

Fixed submission:
r = int(input())

print(r*r)

Buggy submission (verdict: Runtime Error):
魔法両面テープ
Problem p02879 (python)

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

if a > 9 or b > 9:
    print("-1")
else:
    num = a*b
    print(int(num))

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

if a > 9 or b > 9:
    print("-1")
else:
    num = a*b
print(num)
Problem p02819 (python)

Fixed submission:
a = int(input())

def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i >= a]

s = sieve(a * 2)
print(s[0])

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

def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i => a]

s = sieve(a * 2)
print(s[0])
Problem p02820 (python)

Fixed submission:
n = input()    
m = n.split()
p = [int(i) for i in m]
n = input()    
m = n.split()
P = [int(i) for i in m]
n = input()
list = [""]*p[1]
for i, value in enumerate(n):
    list[i%p[1]] =list[i%p[1]] + value
A = 0
for i in list:
    able = [True,True,True]
    for j in i:
        if j == "r":
            if able[2]:
                A = A + P[2]
                able = [True,True,False]
            else:
                able = [True,True,True]
        if j == "s":
            if able[0]:
                A = A + P[0]
                able = [False,True,True]
            else:
                able = [True,True,True]
        if j == "p":
            if able[1]:
                A = A + P[1]
                able = [True,False,True]
            else:
                able = [True,True,True]

print(A)

Buggy submission (verdict: Runtime Error):
p = [int(i) for i in m]
n = input()    
m = n.split()
P = [int(i) for i in m]
n = input()
list = [""]*p[1]
for i, value in enumerate(n):
    list[i%p[1]] =list[i%p[1]] + value
A = 0
for i in list:
    able = [True,True,True]
    for j in i:
        if j == "r":
            if able[2]:
                A = A + P[2]
                able = [True,True,False]
            else:
                able = [True,True,True]
        if j == "s":
            if able[0]:
                A = A + P[0]
                able = [False,True,True]
            else:
                able = [True,True,True]
        if j == "p":
            if able[1]:
                A = A + P[1]
                able = [True,False,True]
            else:
                able = [True,True,True]

print(A)
Problem p02831 (python)

Fixed submission:
import fractions
n = input()    
m = n.split()
p = [int(i) for i in m]
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(p[0], p[1]))

Buggy submission (verdict: Runtime Error):
import math
n = input()    
m = n.split()
p = [int(i) for i in m]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(p[0], p[1]))

Buggy submission (verdict: Runtime Error):
import math
n = input()    
m = n.split()
p = [int(i) for i in m]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(p[0], p[1]))
Problem p02832 (python)

Fixed submission:
N = int(input())
n = input()    
m = n.split()
p = [int(i) for i in m]
j = 1
for i in range(N):
    if p[i] == j:
        j = j+1
if j == 1:
    print("-1")
else:
    print(N - j + 1)

Buggy submission (verdict: Runtime Error):
N = int(input())
n = input()    
m = n.split()
p = [int(i) for i in m]
j = 1
for i in range(N):
    if p[i] == j:
        j = j+1
if j = 1:
    print("-1")
else:
    print(N - j + 1)
Problem p02847 (python)

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

Buggy submission (verdict: Runtime Error):
from collections import deque
n = int(input())
list = []
for i in range(n-1): #因数注意！
    M = input()    
    m = M.split()
    p = [int(i) for i in m] #1列の数列をリスト化
    p = p + [i]
    list.append(p) #list(行列)
color = [0 for i in range(n-1)] #各辺の色
maxcolor = 1
N = deque([[1,0]]) #頂点と使用されている色
delete = deque() #listから探索済みの辺を削除する
while len(list) != 0:
    a = N.popleft()
    b = 0
    for i, value in enumerate(list):
        if value[0] == a[0]:
            b = b + 1
            if b == a[1]:
                b = b + 1
            N.append([value[1],b])
            color[value[2]] = b
            delete.append(i)
            if maxcolor < b:
                maxcolor = b
        elif value[1] == a[0]:
            b = b + 1
            if b == a[1]:
                b = b + 1
            N.append([value[0],b])
            color[value[2]] = b
            delete.append(i)
            if maxcolor < b:
                maxcolor = b
    else:
        c = 0
        while len(delete) != 0:
            c = c + 1
            d = delete.popleft()
            del list[d-c+1]
print(maxcolor)
for i in color:
    print(i)

Buggy submission (verdict: Runtime Error):
n = input()
if n == "MON":
    print("6")
elif n == "TUE":
    print("5")
elif n == "WEN":
    print("4")
elif n == "THU":
    print("3")
elif n == "FRI":
    print("2")
elif n == "SAT":
    print("1")
else n == "SUN":
    print("7")
Problem p02879 (python)

Fixed submission:
n = [int(i) for i in input().split(" ")]
if max(n) < 10:
  print(n[0] * n[1])
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
n = int(input())
c = set([])
for i in range(1,10):
  for j in range (1,10):
    c.add(i * j)
print("Yes") if n in c else print("No")
Problem p02779 (python)

Fixed submission:
n=int(input())
arr=set(map(int,input().split()))
print("YES" if n==len(arr) else "NO")

Buggy submission (verdict: Runtime Error):
n=int(input())
arr=set(map(int,input().split())
print("YES" if n==len(arr) else "NO")
Problem p02777 (python)

Fixed submission:
s,t=input().split()
a,b=map(int,input().split())
c=input()
d=" "
if s==c:
  print("{}""{}""{}".format(a-1,d,b))
else:
  print("{}""{}""{}".format(a,d,b-1))

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
b = list(int(x) for x in input().split())
a=np.array(b)

x = 0
for i in range(n):
    if (a[0] in np.delete(a, 0)) is True:
        print("NO")
        x = 1
        break

if x == 0:
    print("YES")

Buggy submission (verdict: Runtime Error):
s,t=map(input().split())
a,b=map(int,input().split())
c=input()
d=" "
if s==c:
  print("{}""{}""{}".format(a-1,d,b))
else:
  print("{}""{}""{}".format(a,d,b-1))

Buggy submission (verdict: Runtime Error):
s,t=map(input().split())
a,b=map(int,input().split())
c=input()
d=""
if s==c:
  print("{}""{}""{}".format(a-1,d,b))
else:
  print("{}""{}""{}".format(a,d,b-1))

Buggy submission (verdict: Runtime Error):
s,t=map(input().split())
a,b=map(int,input().split())
c=input()
 
if s==c:
  print("{}""{}".format(a-1,b))
else:
  print("{}""{}".format(a,b-1))

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

if s==c:
  print("{}""{}".format(a-1,b))
else:
  print("{}""{}".format(a,b-1))
Problem p02847 (python)

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

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


def is_ok(N):
    return A * N + B * len(str(N)) <= X


ok = 0
ng = 10 ** 9 + 1
while ng - ok > 1:
    m = (ok + ng) // 2
    if is_ok(m):
        ok = m
    else:
        ng = m
print(ok)
Problem p03315 (python)

Fixed submission:
s = raw_input()
print (s.count("+") - s.count("-"))

Buggy submission (verdict: Runtime Error):
s = 123456789
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

if s % sum = 0:
  print("yes")
else:
  print("no")

Buggy submission (verdict: Runtime Error):
s = input()
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

print(sum)

Buggy submission (verdict: Runtime Error):
s = input()
print (s.count("+") - s.count("-"))

Buggy submission (verdict: Runtime Error):
s = raw_input()
print (s.count("+") - s.count("-"))

Buggy submission (verdict: Runtime Error):
s = raw_input()
print(s.count("+") - s.count("-"))
Problem p02777 (python)

Fixed submission:
S, T = input().split(' ')
A, B = list(map(int, input().split(' ')))
U = input()
if U==S: print(A-1,B)
if U==T: print(A,B-1)

Buggy submission (verdict: Runtime Error):
S, T = input().split(' ')
A, B = list(map(int, input().split(' ')))
U = input()
if U==S: return A-1,B
if U==T: return A,B-1
Problem p03834 (python)

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

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

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

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