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

Fixed submission:
import copy
n,h=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n)]
for i in range(n):
    ab[i].append(i)
ab1=copy.copy(ab)
if n==1 and (h-ab[0][1])%ab[0][0]==0:
    print((h-ab[0][1])//ab[0][0]+1)
elif n==1 and (h-ab[0][1])%ab[0][0]!=0:
    print((h-ab[0][1])//ab[0][0]+2)
else:
    ab1.sort()
    ma=ab1[-1][0]
    l=[]
    for i in range(n):
        if ab1[i][0]==ma:l.append(ab1[i])
    l.sort()
    ak=ab.pop(l[0][2])
    ab.sort(key=lambda x:x[1])
    ac=0
    for i in range(1,n):
        if ak[1]>=h:
            h-=ak[1]
            ac+=1
        elif ak[0]>ab[-i][1]:
            h-=ak[0]
            ac+=1
        else:
            h-=ab[-i][1]
            ac+=1
        if h<=0:
            print(ac)
            exit()
    if h<=ak[1]:
        print(ac+1)
    else:
        if (h-ak[1])%ak[0]==0:
            ac+=((h-ak[1])//ak[0])+1
        else:ac+=((h-ak[1])//ak[0])+2
        print(ac)

Buggy submission (verdict: Runtime Error):
import copy
n,h=map(int,input().split())
ab=[list(map(int,input().split())).append(_) for _ in range(n)]
ab1=copy.copy(ab)
if n==1:print((h-ab[0][1])//ab[0][0]+2)
else:
    ab1.sort()
    ma=ab1[-1][0]
    l=[]
    for i in range(n):
        if ab1[i][0]==ma:l.append(ab1[i])
    l.sort()
    ak=ab.pop(l[0][2])
    ab.sort(key=lambda x:x[1])
    ac=0
    for i in range(1,n):
        if ak[0]>ab[-i][1]:
            h-=ak[0]
            ac+=1
        else:
            h-=ab[-i][1]
            ac+=1
        if h<=0:
            print(ac)
            exit()
    if h<=ak[1]:
        print(ac+1)
    else:
        ac+=((h-ak[1])//ak[0])+1
        print(ac)

Buggy submission (verdict: Runtime Error):
import copy
n,h=map(int,input().split())
ab=[list(map(int,input().split()),_) for _ in range(n)]
ab1=copy.copy(ab)
if n==1:print((h-ab[0][1])//ab[0][0]+2)
else:
    ab1.sort()
    ma=ab1[-1][0]
    l=[]
    for i in range(n):
        if ab1[i][0]==ma:l.append(ab1[i])
    l.sort()
    ak=ab.pop(l[0][2])
    ab.sort(key=lambda x:x[1])
    ac=0
    for i in range(1,n):
        if ak[0]>ab[-i][1]:
            h-=ak[0]
            ac+=1
        else:
            h-=ab[-i][1]
            ac+=1
        if h<=0:
            print(ac)
            exit()
    if h<=ak[1]:
        print(ac+1)
    else:
        ac+=((h-ak[1])//ak[0])+1
        print(ac)

Buggy submission (verdict: Runtime Error):
n,h=map(int,input().split())
ab=[list(map(int,input().split()),_) for _ in range(n)]
if n==1:print((h-ab[0][1])//ab[0][0]+2)
else:
    ab1.sort()
    ma=ab1[-1][0]
    l=[]
    for i in range(n):
        if ab1[i][0]==ma:l.append(ab1[i])
    l.sort()
    ak=ab.pop(l[0][2])
    ab.sort(key=lambda x:x[1])
    ac=0
    for i in range(1,n):
        if ak[0]>ab[-i][1]:
            h-=ak[0]
            ac+=1
        else:
            h-=ab[-i][1]
            ac+=1
        if h<=0:
            print(ac)
            exit()
    if h<=ak[1]:
        print(ac+1)
    else:
        ac+=((h-ak[1])//ak[0])+1
        print(ac)
Problem p03475 (python)

Fixed submission:
import math

n = int(input())
csf = [list(map(int, input().split())) for i in range(n-1)]
ANS = []
for i in range(n):
  ans = 0
  for c,s,f in csf[i:]:
    if ans <= s:
      ans = s + c
    else:
      ans = s + math.ceil((ans-s)/f) * f + c
  ANS.append(ans)
for i in ANS:
  print(i)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[list(map(int,input().split()))]
l1=[0]*n
for i in range(n-1):
    l1[i]+=l[i][0]+l[i][1]
    for j in range(1,n-i-1):
        if l1[i]<l[i+j][1]:
            l1[i]-=l1[i]
            l1[i]+=l[i+j][1]
            
        if l1[i]>=l[i+j][1] and (l1[i]-l[i+j][1])%l[i+j][2]!=0:
            l1[i]+=((l[i+j][1]%l[i+j][2])+(l[i+j][2]*l1[i]))%l1[i]
            
        if l1[i]>=l[i+j][1] and (l1[i]-l[i+j][1])%l[i+j][2]==0:
            l1[i]+=l[i+j][0]
    print(l1[i])
print(0)
Problem p03476 (python)

Fixed submission:
q = int(input())
k = 10**5+1
x = [0]*k
def sieve(n):
    prime = [True] * (n+1)
    prime[0] = prime[1] = False
    for i in range(2, n+1):
        if prime[i]:
            for j in range(i*2, n+1, i):
                prime[j] = False
    return prime

p = sieve(k+1)
c = 0
for i in range(3, k):
    if p[i] and p[(i+1)//2]:
        c += 1
    x[i] = c

for _ in range(q):
    l, r = map(int, input().split())
    print(x[r] - x[l-1])

Buggy submission (verdict: Runtime Error):
q=int(input())
pn=[2]
qn=[0]*10**5+1
c=0
for i in range(1, 10**5+1,2):
    for i2 in pn:
        if i % i2 == 0:
            break
        else:
            pn.append(i)
for i in range(10**5+1):
    if (pn[i]+1)/2 in pn:
        c+=1
    qn[i]=c
for _ in range(q):
    l,r = map(int, input().split())
    print(qn[r]-qn[l-1])

Buggy submission (verdict: Runtime Error):
q=int(input())
lr=[list(map(int,input().split())) for _ in range(q)]
pn=[2]
for L in range(3, 10**5, 2):
    for L2 in pn:
        if L % L2 == 0:
            break
    else:
        if (L+1)/2 in pn:
            pn.append(L)
pn.pop(0)
for i in range(q):
    print(len([i for i in pn if lr[i][0]<=i<=lr[i][1]]))
Problem p03478 (python)

Fixed submission:
n,a,b=map(int,input().split())
k=0
for i in range(n+1):
    n1=list(str(i))
    n2=sum(int(j) for j in n1)
    if a<=n2<=b:k+=i
    else:pass
print(k)

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
n1=list(range(1,n+1))
k=[]
for j in range(n):
    n2=sum(int(i) for i in n1[j])
    if a<=n2<=b:k.append(n1[j])
    else:pass
print(sum(int(l) for l in k))
Problem p03485 (python)

Fixed submission:
import math
a,b = map(int,input().split())
print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
print(math.ceil((a+b)//2))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
print(math.floor((a+b)/2))
Problem p03545 (python)

Fixed submission:
k=input()
a=int(k[0])
b=int(k[1])
c=int(k[2])
d=int(k[3])
if (a+b+c+d)==7:print(k[0]+'+'+k[1]+'+'+k[2]+'+'+k[3]+'='+'7')
elif (a-b+c+d)==7:print(k[0]+'-'+k[1]+'+'+k[2]+'+'+k[3]+'='+'7')
elif (a+b-c+d)==7:print(k[0]+'+'+k[1]+'-'+k[2]+'+'+k[3]+'='+'7')
elif (a+b+c-d)==7:print(k[0]+'+'+k[1]+'+'+k[2]+'-'+k[3]+'='+'7')
elif (a-b-c+d)==7:print(k[0]+'-'+k[1]+'-'+k[2]+'+'+k[3]+'='+'7')
elif (a+b-c-d)==7:print(k[0]+'+'+k[1]+'-'+k[2]+'-'+k[3]+'='+'7')
elif (a-b+c-d)==7:print(k[0]+'-'+k[1]+'+'+k[2]+'-'+k[3]+'='+'7')
elif (a-b-c-d)==7:print(k[0]+'-'+k[1]+'-'+k[2]+'-'+k[3]+'='+'7')

Buggy submission (verdict: Runtime Error):
a=int(k[0])
b=int(k[1])
c=int(k[2])
d=int(k[3])
if (a+b+c+d)==7:print(k[0]+'+'+k[1]+'+'+k[2]+'+'+k[3]+'='+'7')
elif (a-b+c+d)==7:print(k[0]+'-'+k[1]+'+'+k[2]+'+'+k[3]+'='+'7')
elif (a+b-c+d)==7:print(k[0]+'+'+k[1]+'-'+k[2]+'+'+k[3]+'='+'7')
elif (a+b+c-d)==7:print(k[0]+'+'+k[1]+'+'+k[2]+'-'+k[3]+'='+'7')
elif (a-b-c+d)==7:print(k[0]+'-'+k[1]+'-'+k[2]+'+'+k[3]+'='+'7')
elif (a+b-c-d)==7:print(k[0]+'+'+k[1]+'-'+k[2]+'-'+k[3]+'='+'7')
elif (a-b+c-d)==7:print(k[0]+'-'+k[1]+'+'+k[2]+'-'+k[3]+'='+'7')
elif (a-b-c-d)==7:print(k[0]+'-'+k[1]+'-'+k[2]+'-'+k[3]+'='+'7')
Problem p03597 (python)

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

Buggy submission (verdict: Runtime Error):
n,a=map(int,input().split('/n'))
print((n**2) -a )

Buggy submission (verdict: Runtime Error):
n,a=map(int,input().splitlines())
print((n**2) -a )

Buggy submission (verdict: Runtime Error):
n,a=map(int,input().split())
print((n**2) -a )
Problem p03598 (python)

Fixed submission:
n=int(input())
k=int(input())
x=list(map(int,input().split()))
l=[]
for i in range(n):
    p=2*min(x[i],k-x[i])
    l.append(p)
print(sum(l))

Buggy submission (verdict: Runtime Error):
n=int(input())
k=int(input())
x=map(int,input().split())
l=[]
for i in range(n):
    p=2*min(x[i],k-x[i])
    l.append(p)
print(sum(l))
Problem p03607 (python)

Fixed submission:
import sys
P=set()
N=int(input())
for s in sys.stdin.readlines():
    n = int(s)
    if n in P:
        P.remove(n)
    else:
        P.add(n)
print(len(P))

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
input = sys.stdin.readline
n=int(input())
l=[0]*10**5
for i in range(n):
    a=int(input())
    l[a-1]+=1
l1=np.array(l)
print(np.count_nonzero(l1%2==1))

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
input = sys.stdin.readline
n=int(input())
l=[0]*10**5
for i in range(n):
    a=int(input())
    l[a-1]+=1
l1=np.array(l)
l2=l%2
l2.count('1')
Problem p03610 (python)

Fixed submission:
s = list(input())
k = s[::2]
print("".join(k))

Buggy submission (verdict: Runtime Error):
s=input()
k=[]
if len(s)%2==0:
   for i in range(len(s)/2):
       k.append(s[2*i])
else:
    for i in range((len(s)//2)+1):
        k.append(s[2*i])
print("".join(k))

Buggy submission (verdict: Runtime Error):
s=list(map(input()))
k=[]
if len(s)%2==0:
   for i in range(len(s)/2):
       k.append(s[2*i])
else:
    for i in range((len(s)//2)+1):
        k.append(s[2*i])
print("".join(k))

Buggy submission (verdict: Runtime Error):
s=list(input())
k=[]
if len(s)%2==0:
   for i in range(len(s)/2):
       k.append(s[2*i])
else:
    for i in range((len(s)//2)+1):
        k.append(s[2*i])
print("".join(k))
Problem p03623 (python)

Fixed submission:
x,a,b=map(int,input().split())
if abs(a-x)<abs(b-x):print('A')
else:print('B')

Buggy submission (verdict: Runtime Error):
x,a,b=map(int,input().split())
if |a-x|<|b-x|:print('A')
else:print('B')
Problem p03658 (python)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
l1 = sorted(l, reverse=True)
s=0
for i in range(k):
    s+=l1[i]
print(s)

Buggy submission (verdict: Runtime Error):
n,k=map(int(input().split()))
l=list(map(int,input().split()))
l1 = sorted(l, reverse=True)
s=0
for i in range(k):
    s+=l1[i]
print(s)

Buggy submission (verdict: Runtime Error):
n,k=int(input().split())
l=list(map(int,input().split()))
l1 = sorted(l, reverse=True)
s=0
for i in range(k):
    s+=l1[i]
print(s)

Buggy submission (verdict: Runtime Error):
n,k=int(input().split())
l=list(map(int,input()))
l1 = sorted(l, reverse=True)
s=0
for i in range(k):
    s+=l1[i]
print(s)

Buggy submission (verdict: Runtime Error):
n,k=int(input())
l=list(map(int,input()))
l.sort()
s=0
for i in range(k):
    s+=l[i]
print(s)

Buggy submission (verdict: Runtime Error):
n,k=int(input())
l=list(map(int,input().split()))
l.sort()
s=0
for i in range(k):
    s+=l[i]
print(s)
Problem p03679 (python)

Fixed submission:
x,a,b=map(int,input().split())
if a-b>=0:print('delicious')
elif a-b < 0 and a+x>=b:print('safe')
else:print('dangerous')

Buggy submission (verdict: Runtime Error):
x,a,b=int(input().split())
if a-b>=0:print('delicious')
elif a-b < 0 and a+x>=b:print('safe')
else:print('dangerous')
Problem p03680 (python)

Fixed submission:
n=int(input())
a = [int(input()) for _ in range(n)]
nex=[]
k=1
for i in range(len(a)):
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass

Buggy submission (verdict: Runtime Error):
n=int(input())
a = [map(int,input() for _ in range(n))]
nex=[]
k=1
for i in range(len(a)):
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass

Buggy submission (verdict: Runtime Error):
n=int(input())
a = [map(int,input()) for _ in range(n)]
nex=[]
k=1
for i in range(len(a)):
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass

Buggy submission (verdict: Runtime Error):
n=int(input())
a = [input() for _ in range(n)]
nex=[]
k=1
for i in range(len(a)):
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass

Buggy submission (verdict: Runtime Error):
from itertools import chain
n=int(input())
an= [list(input()) for _ in range(n)]
a=list(chain.from_iterable(an))
nex=[]
k=1
for i in range(len(a)):
    #if k-1==-1:k-1=0
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass

Buggy submission (verdict: Runtime Error):
n=int(input())
a= [list(input()) for _ in range(n)]
nex=[]
k=1
for i in range(len(a)):
    #if k-1==-1:k-1=0
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass
Problem p03693 (python)

Fixed submission:
r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')

Buggy submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
k = ((10*g) + b)%4
if k == 0 :print('YES')
  else:print('NO')

Buggy submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
k = (10*g + b)%4
if k == 0 :print('YES')
  else:print('NO')

Buggy submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
if (((10*g)+b)%4) == 0 :print('YES')
  else:print('NO')

Buggy submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
if (10*g + b )%4 == 0 :print('YES')
  else:print('NO')

Buggy submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
if ((g+b)%4) == 0 :print('YES')
  else:print('NO')
Problem p03695 (python)

Fixed submission:
import numpy as np
n=int(input())
a=list(map(int,input().split()))
a=np.array(a)
a=a//400
a1=[i for i in a if i<8]
a2=[i for i in a if i>=8]
k=len(set(a1))
m=k+len(a2)
#>8:m=8 else:m=k+len(a2)
if len(set(a1))!=0:s=len(set(a1))
else:s=1
print(s,m)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[map(int,input().split())]
a=map(lambda x:x//400,a)
a1=[i for i in a if i<8]
a2=[i for i in a if i>7]
k=len(set(a1))
if k+len(a2)>8:m=8
else:m=k+len(a2)

print(len(set(a1)),m)
Problem p03697 (python)

Fixed submission:
a,b=map(int,input().split())
if (a+b)>=10:print('error')
else:print(a+b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a+b >= 10:print('error')
  else:print(a+b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a+b>=10:print('error')
  else:print(a+b)
Problem p03712 (python)

Fixed submission:
h,w=map(int,input().split())
a= [list(input().split()) for _ in range(h)]
print('#'*(w+2))
for i in range(h):
    print('#'+"".join(a[i])+'#')
print('#'*(w+2))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
a= [list(map(input().split())) for _ in range(h)]
print('#'*(w+2))
for i in range(h):
    print('#'+"".join(a[i])+'#')
print('#'*(w+2))
Problem p03729 (python)

Fixed submission:
a,b,c=list(map(str,input().split()))
if a[-1]==b[0] and b[-1]==c[0]:print('YES')
else:print('NO')

Buggy submission (verdict: Runtime Error):
a,b,c=list(map(str,input().split()))
if a[-1]==b[0] and b[-1]==c[0]:print('YES')
else print('NO')

Buggy submission (verdict: Runtime Error):
|A|,|B|,|C| = list(map(int,input().split()))
a,b,c=list(map(str,input().split()))
if a[|A|-1]==b[0] and b[|B|-1]==c[0] :print('YES')
else:print('NO')
Problem p03737 (python)

Fixed submission:
s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])

Buggy submission (verdict: Runtime Error):
s1,s2,s3=map(str,input().split().capitalize()) #文字列
print(s1[0]+s2[0]+s3[0])

Buggy submission (verdict: Runtime Error):
s1,s2,s3=input().split().capitalize() #文字列
print(s1[0]+s2[0]+s3[0])

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = list(map(str,input(),split()))
s1,s2,s3 = map(str.upper())
print( s1[0] + s2[0] + s3[0])

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = list(map(str,input()))
s1,s2,s3 = map(str.upper())
print( s1[0] + s2[0] + s3[0])

Buggy submission (verdict: Runtime Error):
a,b,c = list(map(str,input()))
a,b,c = map(str.upper())
print( a[0] + b[0] + c[0])
Problem p03759 (python)

Fixed submission:
a,b,c=list(map(int,input().split()))
if b-a==c-b:print('YES')
else:print('NO')

Buggy submission (verdict: Runtime Error):
a,b,c=list(map(int,input().split()))
if b-a==c-b:print(YES)
else:print(NO)
Problem p03777 (python)

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

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')

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

if a='H' and b='H':print('H')
elif a='D' and b='D':print('H')
else:print('D')

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

if a==H and b==H:print('H')
elif a==D and b==D:print('H')
else:print('D')

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

if a=H and b=H:print('H')
elif a=D and b=D:print('H')
else:print('D')

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

if a==H and b==H:print(H)
elif a==D and b==D:print(H)
else:print(D)

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

if a=H and b=H:print(H)
elif a=D and b=D:print(H)
else:print(D)

Buggy submission (verdict: Runtime Error):
if a='H' and b='H':print(H)
elif a='D' and b='D':print(H)
else:print(D)
Problem p03826 (python)

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

ab = a*b
cd = c*d
if ab>cd:print(ab)
elif cd>ab:print(cd)
else:print(ab)

Buggy submission (verdict: Runtime Error):
A,B,C,D=list(map(int,input()))
ab=A*B
cd=C*D
if ab>cd:print(ab)
elif cd>ab:print(cd)
else:print(ab)
Problem p03827 (python)

Fixed submission:
n=int(input())
s=list(input())
k=[0]
for i in range(0,n):
    if s[i]=='I':k.append(int(k[i]+1))
    else:k.append(int(k[i]-1))
print(max(k))

Buggy submission (verdict: Runtime Error):
n=int(input())
s=list(input())
k=[0]
for i in range(0,n):
    if s[i]=='I':k.append(int(k[i]+1)
    else:k.append(int(k[i]-1))
print(max(k))
Problem p03844 (python)

Fixed submission:
a,op,b=input().split() #文字列
if op=='+':print(int(a)+int(b))
else:print(int(a)-int(b))

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

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

print(A+B or A-B)
Problem p03845 (python)

Fixed submission:
n=int(input())
t=list(map(int,input().split()))
sumt=sum(t)
m=int(input())
px = [list(map(int, input().split())) for _ in range(m)]
for i in range(m):   
    a=t[px[i][0]-1]
    b=px[i][1]
    print(sumt-a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
t=list(map(int,input().split()))
sumt=sum(t)
m=int(input())

for i in range(m):
    px = [list(map(int, input().split())) for _ in range(m)]
    a=t[px[i][0]-1]
    b=px[i][1]
    print(sumt-a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
t=list(int(input().split()))
m=int(input())
px = [list(map(int, input().split())) for _ in range(m)]

for i in range(m):
    t[px[i][0]]=px[i][1]
    print(sum(t))
Problem p03860 (python)

Fixed submission:
a,s,c=input().split()
print(a[0]+s[0]+c[0])

Buggy submission (verdict: Runtime Error):
a,s,c=map(input().split())
print(a[0]+s[0]+c[0])

Buggy submission (verdict: Runtime Error):
a,s,c=str(input().split())
print(a[0]+s[0]+c[0])

Buggy submission (verdict: Runtime Error):
a,s,c=input().split()
print(f'{a[0]}{s[0]}{c[0]}')

Buggy submission (verdict: Runtime Error):
a,s,c=map(str,input().split())
print(f'{a[0]}{s[0]}{c[0]}')

Buggy submission (verdict: Runtime Error):
a,s,c=str(input().split())
print(f'{a[0]}{s[0]}{c[0]}')

Buggy submission (verdict: Runtime Error):
a,s,c=map(str(input().split()).capitalize())
print(f'{"A"}{s[0]}{"C"}')

Buggy submission (verdict: Runtime Error):
s=str(input()).capitalize()
print(f'{"A"}{s[0]}{"C"}')
Problem p03943 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a==b+c or b==a+c or c==a+b :print('Yes')
  else:print('No')

Buggy submission (verdict: Runtime Error):
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('Yes')
  else:print('No')

Buggy submission (verdict: Runtime Error):
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('YES')
  else:print('NO')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if a==b+c or b==a+c or c==a+b:
   print(Yes)
else:print(No)

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

if a==b+c or b==a+c or c==a+b:
   print(Yes)
else:print(No)
Problem p03944 (python)

Fixed submission:
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
wl,wr,hu,ht=0,w,0,h
for i in range(n):
    if xya[i][2]==1:
        wl=max(wl,int(xya[i][0]))
    elif xya[i][2]==2:
        wr=min(wr,int(xya[i][0]))
    elif xya[i][2]==3:
        hu=max(hu,int(xya[i][1]))
    elif xya[i][2]==4:
        ht=min(ht,int(xya[i][1]))
    else:pass
if wl>wr or hu>ht:print(0)
else:print((wr-wl)*(ht-hu))

Buggy submission (verdict: Runtime Error):
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
w1=w
h1=h
for i in range(n):
    if xya[i][2]==1:w1=w-int(xya[i][0])
    elif xya[i][2]==2:w1-=(w-int(xya[i][0])
    elif xya[i][2]==3:h1=h-int(xya[i][1])
    elif xya[i][2]==4:h1-=(h-int(xya)[i][1])
    else:pass
if w1>0 and h1>0:print(w1*h1)
else:print(0)

Buggy submission (verdict: Runtime Error):
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
xya.sort(a)
w1=w
h1=h
for i in range(n):
    if xya[i][2]==1:w1=w-int(xya[i][0])
    elif xya[i][2]==2:w1-=(w-int(xya[i][0])
    elif xya[i][2]==3:h1=h-int(xya[i][1])
    elif xya[i][2]==4:h1-=(h-int(xya)[i][1])
    else:pass
if w1>0 and h1>0:print(w1*h1)
else:print(0)
Problem p03962 (python)

Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b==c:print('1')
elif (a==b and c!=a) or (b==c and a!=b) or (c==a and b!=c):print('2')
else:print('3')

Buggy submission (verdict: Runtime Error):
if a==b==c:print('1')
elif a==b or b==c or c==a:print('2')
else:print('3')

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a==b==c:
  print(1)
elif a==b or b==c or c==a:
  print(2)
else:print(3)
print(a,b,c)

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

if a=b=c:
  print(1)
elif a=b or b=c or c=a:
  print(2)
else:print(3)
Problem p04029 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(N)
print( int(((1+N)*N)/2) )

Buggy submission (verdict: Runtime Error):
print( int(((1+int(N))*N)/2) )

Buggy submission (verdict: Runtime Error):
print(int((1+int(N))*N/2))
Problem p04043 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=list(map(int,input().split()))
k.sort()
if k[0] == k[1] == 5 and k[2] == 7:
   print(Yes)
else:print(No)

Buggy submission (verdict: Runtime Error):
if (a==5 and b==5 and c==7) or (a==5 and b==7 and c==5) or (a==7 and b==5 and c==5):
   print(Yes)
else:print(No)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
 
if A=5 and B=5 and C=7:
    print('YES')
elif A=5 and B=7 and C=5:
    print('YES')
elif A=7 and B=5 and C=5:
    print('YES')
else:print('NO')

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

if A==5 and B==5 and C==7:
    print('YES')
elif A==5 and B==7 and C==5:
    print('YES')
elif A==7 and B==5 and C==5:
    print('YES')
else:print('NO')

Buggy submission (verdict: Runtime Error):
if A==5 and B==5 and C==7:
    print('YES')
elif A==5 and B==7 and C==5:
    print('YES')
elif A==7 and B==5 and C==5:
    print('YES')
else:print('NO')

Buggy submission (verdict: Runtime Error):
if [A,B,C]=[5,5,7]or[5,7,5]or[7,5,5]:
   print(YES)
   else:print(NO)
Problem p04044 (python)

Fixed submission:
n,l=map(int,input().split())
s=[input() for i in range(n)]
s.sort()
print(*s,sep="")

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
s=[input() for i in range(n)]
s.sort()
print(*a,sep="")