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

Fixed submission:
i=int(input())
s=int(input())
print(i*i-s)

Buggy submission (verdict: Runtime Error):
a,b,c,d,e,f=map(int,input().split())
l=[]
for i in range(0,f//(100*a)+1):
  for j in range(0,f//(100*b)+1):
    if 100*a*i+100*b*j>=f:
      pass
    else:
      l.append(100*a*i+100*b*j)
l1=[]
del l[0]
max1=0
g=0
h=0
for i in l:
  l2=[]
  m=min(f-i,(i//100)*e)
  max2=0
  for j in range(0,m//c+1):
    for k in range(0,m//d+1):
      if j*c+k*d<=m and j*c+k*d>max2:
        max2=j*c+k*d
  if max1<100*max2/(i+max2):
    g=i
    f=max2
    max1=100*max2/(i+max2)
print(i+max2,max2)
Problem p03605 (python)

Fixed submission:
n=list(input())
if "9" in n:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[]
for i in range(n):
  m=int(input())
  l.append(m)
c=0
d=1
e=l[0]
l=sorted(l)
for i in range(1,n):
  if l[i]!=e:
    if d%2==1:
      c+=1
    e=l[i]
    d=1
  else:
    d+=1
if d%2==1:
  c+=1
print(c)
Problem p03610 (python)

Fixed submission:
l=input()
w=""
c=0
while len(w)<len(l)/2:
  w+=l[c]
  c+=2
print(w)

Buggy submission (verdict: Runtime Error):
l=input()
w=""
c=1
while len(w)<len(l):
  w+=l[c]
  c+=2
print(w)
Problem p03611 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
l.sort()
lcount=[]
count=0
now=l[0]
for i in range(n):
  if now==l[i]:
    count+=1
  else:
    lcount.append([count,now])
    count=1
    now=l[i]
lcount.append([count,now])
if len(lcount)==1:
  print(n)
elif len(lcount)==2:
  l1=lcount[0][0]
  l2=lcount[1][0]
  if lcount[1][1]-lcount[0][1]==1:
    print(l1+l2)
  else:
    print(max(l1,l2))
else:
  count=0
  for i in range(1,len(lcount)-1):
    scount=0
    scount+=lcount[i][0]
    if lcount[i][1]-lcount[i-1][1]==1:
      scount+=lcount[i-1][0]
    if lcount[i][1]-lcount[i+1][1]==-1:
      scount+=lcount[i+1][0]
    if scount>count:
      count=scount
  count1=lcount[0][0]
  if lcount[1][1]-lcount[0][1]==1:
    count1+=lcount[1][0]
  count2=lcount[-1][0]
  if lcount[-2][1]-lcount[-1][1]==-1:
    count2+=lcount[-2][0]
  print(max(count,count1,count2))

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
l.sort()
lcount=[]
count=0
now=l[0]
for i in range(n):
  if now==l[i]:
    count+=1
  else:
    lcount.append([count,now])
    count=1
    now=l[i]
if count!=1:
  lcount.append([count,now])
if len(lcount)==1:
  print(n)
elif len(lcount)==2:
  l1=lcount[0][0]
  l2=lcount[1][0]
  if lcount[1][1]-lcount[0][1]==1:
    print(l1+l2)
  else:
    print(max(l1,l2))
else:
  count=0
  for i in range(1,len(lcount)-1):
    scount=0
    scount+=lcount[i][0]
    if lcount[i][1]-lcount[i-1][1]==1:
      scount+=lcount[i-1][0]
    if lcount[i][1]-lcount[i+1][1]==-1:
      scount+=lcount[i+1][0]
    if scount>count:
      count=scount
  count1=lcount[0][0]
  if lcount[1][1]-lcount[0][1]==1:
    count1+=lcount[1][0]
  count2=lcount[-1][0]
  if lcount[-2][1]-lcount[-1][1]==-1:
    count2+=lcount[-2][0]
  print(max(count,count1,count2))

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
l.sort()
lcount=[]
count=0
now=l[0]
for i in range(n):
  if now==l[i]:
    count+=1
  else:
    lcount.append([count,now])
    count=1
    now=l[i]
if count!=1:
  lcount.append([count,now])
count=0
for i in range(1,len(lcount)-1):
  scount=0
  scount+=lcount[i][0]
  if lcount[i][1]-lcount[i-1][1]==1:
    scount+=lcount[i-1][0]
  if lcount[i][1]-lcount[i+1][1]==-1:
    scount+=lcount[i+1][0]
  if scount>count:
    count=scount
count1=lcount[0][0]
if lcount[1][1]-lcount[0][1]==1:
  count1+=lcount[1][0]
count2=lcount[-1][0]
if lcount[-2][1]-lcount[-1][1]==-1:
  count2+=lcount[-2][0]
print(max(count,count1,count2))
Problem p03627 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
l1={}
l2=[]
for i in l:
  if i in l1:
    if l1[i]%2==0:
      l1[i]+=1
    else:
      l2.append(i)
      l1[i]+=1
  else:
    l1[i]=1
if len(l2)<2:
  print(0)
else:
  l2=sorted(l2)
  print(l2[-1]*l2[-2])

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
l1={}
l2=[]
for i in l:
  if i in l1:
    if l1[i]%2==0:
      l1[i]+=1
    else:
      l2.append(i)
      l1[i]+=1
  else:
    l1[i]=1
l2=sorted(l2)
print(l2[-1]*l2[-2])
Problem p03632 (python)

Fixed submission:
a1,a2,b1,b2=map(int,input().split())
print(max(min(a2,b2)-max(b1,a1),0))

Buggy submission (verdict: Runtime Error):
a1,a2,b1,b2=map(int,input().split())
print(max(min(a2,b2)-max(b1,a1),0)
Problem p03633 (python)

Fixed submission:
n=int(input())
t=1
import fractions
for i in range(n):
  j=int(input())
  t=t*j//fractions.gcd(t,j)
print(t)

Buggy submission (verdict: Runtime Error):
n=int(input())
t=1
import math
for i in range(n):
  j=int(input())
  t=t*j//math.gcd(t,j)
print(t)
Problem p03644 (python)

Fixed submission:
i=int(input())
for n in range(0,9):
  if 2**n<=i<2**(n+1):
    print(2**n)
    break

Buggy submission (verdict: Runtime Error):
i=int(input())
for n in range(0,9):
  if 2**n=<i<2**(n+1):
    print(2**n)
    break
Problem p03651 (python)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
def gcd(n,m):
  if n>m:
    a=n
    b=m
  else:
    a=m
    b=n
  while b!=0:
    a,b=b,a%b
  return a
g=l[0]
max=l[0]
for i in range(1,1+n-1):
  g=gcd(g,l[i])
  if max<l[i]:
    max=l[i]
if max<k:
  print("IMPOSSIBLE")
elif max==k:
  print("POSSIBLE")
else:
  if k%g==0:
    print("POSSIBLE")
  else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
def gcd(n,m):
  a=max(n,m)
  b=min(n,m)
  while b!=0:
    a,b=b,a%b
  return a
g=l[0]
max=l[0]
for i in range(1,1+n-1):
  g=gcd(g,l[i])
  if max<l[i]:
    max=l[i]
if max<k:
  print("POSSIBLE")
elif max==k:
  print("POSSIBLE")
else:
  if k%g==0:
    print("POSSIBLE")
  else:
    print("IMPOSSIBLE")
Problem p03672 (python)

Fixed submission:
w=list(input())
for i in range(len(w)):
  del w[-1]
  del w[-1]
  if w[0:len(w)//2]==w[len(w)//2:len(w)]:
    print(len(w))
    break

Buggy submission (verdict: Runtime Error):
w=list(input())
for i in range(len(w)):
  del w[-1]
  del w[-1]
  if w[0:len(w)/2]==w[len(w)/2:len(w)]:
    print(len(w))
    break
Problem p03679 (python)

Fixed submission:
a,s,d=map(int,input().split())
if s-d>=0:
  print("delicious")
elif a+s-d>=0:
  print("safe")
else:
  print("dangerous")

Buggy submission (verdict: Runtime Error):
a,s,d=map(int,input().split())
if s-d>=0:
  print("delicious")
elif a+s-d>=-:
  print("safe")
else:
  print("dangerous")
Problem p03681 (python)

Fixed submission:
import math
n,m=map(int,input().split())
a=math.factorial(n)
b=math.factorial(m)
if n==m:
  print((2*a**2)%(10**9+7))
elif abs(n-m)==1:
  print((a*b)%(10**9+7))
else:
  print(0)

Buggy submission (verdict: Runtime Error):
import math
n,m=map(int,input().split())
a=math.factrial(n)
b=math.factrial(m)
if n==m:
  print((2*a**2)%(10**9+7))
elif abs(n-m)==1:
  print((a*b)%(10**9+7))
else:
  print(0)

Buggy submission (verdict: Runtime Error):
def fact(n):
  if n==1:
    return 1
  else:
    return n*fact(n-1)
n,m=map(int,input().split())
if n==m:
  print(2*(fact(n))**2%(10**9+7))
elif abs(n-m)=1:
  print(fact(n)*fact(m)%(10**9+7))
else:
  print(0)
Problem p03693 (python)

Fixed submission:
a,s,d=map(int,input().split())
if (10*s+d)%4==0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
col=[False for i in range(8)]
val=0
count=0
for i in range(n):
  m=l[i]
  if m<400:
    col[0]=True
  if 400<=m<800:
    col[1]=True
  if 800<=m<1200:
    col[2]=True
  if 1200<=m<1600:
    col[3]=True
  if 1600<=m<2000:
    col[4]=True
  if 2000<=m<2400:
    col[5]=True
  if 2400<=m<2800:
    col[6]=True
  if 2800<=m<3200:
    col[7]=True
  if m>=3200:
    val+=1
for i in range(8):
  if col[i]:
    count+=1
print(count,min(8,count+val))
Problem p03695 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
col=[False for i in range(8)]
val=0
count=0
for i in range(n):
  m=l[i]
  if m<400:
    col[0]=True
  if 400<=m<800:
    col[1]=True
  if 800<=m<1200:
    col[2]=True
  if 1200<=m<1600:
    col[3]=True
  if 1600<=m<2000:
    col[4]=True
  if 2000<=m<2400:
    col[5]=True
  if 2400<=m<2800:
    col[6]=True
  if 2800<=m<3200:
    col[7]=True
  if m>=3200:
    val+=1
for i in range(8):
  if col[i]:
    count+=1
print(max(1,count),count+val)

Buggy submission (verdict: Runtime Error):
n=input()
l=list(map(int,input().split()))
col=[False for i in range(8)]
val=0
count=0
for i in range(n):
  m=l[i]
  if m<400:
    col[0]=True
  elif m<800:
    col[1]=True
  elif m<1200:
    col[2]=True
  elif m<1600:
    col[3]=True
  elif m<2000:
    col[4]=True
  elif m<2400:
    col[5]=True
  elif m<2800:
    col[6]=True
  elif m<3200:
    col[7]=True
  else:
    val+=1
for i in range(8):
  if col[i]:
    count+=1
print(count,min(8,count+val))
Problem p03760 (python)

Fixed submission:
lo=list(input())
le=list(input())
l=""
for i in range(len(le)):
  l+=lo[i]
  l+=le[i]
if len(le)==len(lo):
  print(l)
else:
  print(l+lo[-1])

Buggy submission (verdict: Runtime Error):
lo=list(input())
le=list(input())
l==""
for i in range(len(le)):
  l+=lo[i]
  l+=le[i]
if len(le)==len(lo):
  print(l)
else:
  print(l+lo[-1])
Problem p03777 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=input().split()
if a,b==("H","H") or a,b==("D","D"):
  print("H")
else:
  print("D")
Problem p03796 (python)

Fixed submission:
n=int(input())
import math
m=math.factorial(n)
print(m%(10**9+7))

Buggy submission (verdict: Runtime Error):
n=int(input())
inport math
m=math.factorial(n)
print(m%(10**9+7))
Problem p03800 (python)

Fixed submission:
n=int(input())
w1=list(input())
s="S"
w="W"
o="o"
x="x"
l=[[s,s],[s,w],[w,w],[w,s]]
for j in range(4):
    for i in range(1,n):
        if w1[i]==o:
            if l[j][-1]==s:
                if l[j][-2]==s:
                    l[j].append(s)
                else:
                    l[j].append(w)
            else:
                if l[j][-2]==s:
                    l[j].append(w)
                else:
                    l[j].append(s)
        else:
            if l[j][-1]==s:
                if l[j][-2]==s:
                    l[j].append(w)
                else:
                    l[j].append(s)
            else:
                if l[j][-2]==s:
                    l[j].append(s)
                else:
                    l[j].append(w)
b=False
for i in range(4):
  if l[i][0]==l[i][-1] and not b:
    del l[i][-1]
    if l[i][0]==s:
      if (l[i][1]==l[i][-1] and w1[0]==o) or (l[i][1]!=l[i][-1] and w1[0]==x):
        answer=l[i]
        b=True
        break
    else:
      if (l[i][1]!=l[i][-1] and w1[0]==o) or (l[i][1]==l[i][-1] and w1[0]==x):
        answer=l[i]
        b=True
        break
if not b:
    print(-1)
else:
    print("".join(answer))

Buggy submission (verdict: Runtime Error):
n=int(input())
w1=list(input())
s="S"
w="W"
o="o"
x="x"
l=[[s,s],[s,w],[w,w],[w,s]]
for j in range(4):
    for i in range(1,n):
        if w1[i]==o:
            if l[j][-1]==s:
                if l[j][-2]==s:
                    l[j].append(s)
                else:
                    l[j].append(w)
            else:
                if l[j][-2]==s:
                    l[j].append(w)
                else:
                    l[j].append(s)
        else:
            if l[j][-1]==s:
                if l[j][-2]==s:
                    l[j].append(w)
                else:
                    l[j].append(s)
            else:
                if l[j][-2]==s:
                    l[j].append(s)
                else:
                    l[j].append(w)
for i in range(4):
  if l[i][0]==l[i][-1]:
    del l[i][-1]
    answer=l[i]
    b=True
    break
if not b:
    print(-1)
else:
    print("".join(answer))
Problem p03814 (python)

Fixed submission:
s=list(input())
x=0
y=0
for i in range(0,len(s)):
  if s[i]=="A":
    x=i
    break
for i in range(1,len(s)):
  if s[-i]=="Z":
    y=i
    break
print(len(s)-x-y+1)

Buggy submission (verdict: Runtime Error):
s=list(input())
x=0
y=0
while x=0:
  if s[0]!="A":
    del s[0]
  else:
    x=1
while y=0:
  if s[-1]!="Z":
    del s[-1]
  else:
    y=1
print(len(s))
Problem p03827 (python)

Fixed submission:
n=int(input())
l=list(input())
s=0
lis=[0]
for i in range(n):
  if l[i]=="D":
    s+=-1
    lis.append(s)
  else:
    s+=1
    lis.append(s)
print(max(lis))

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(input())
n=0
lis=[]
for i in range(n):
  if l[i]=="D":
    n+=-1
  else:
    n+=1
  lis.append(n)
print(max(lis))
Problem p03844 (python)

Fixed submission:
a,s,d=input().split()
if s=="+":
  print(int(a)+int(d))
else:
  print(int(a)-int(d))

Buggy submission (verdict: Runtime Error):
a,s,d=map(input().split())
if s=="+":
  print(int(a)+int(d))
else:
  print(int(a)-int(d))
Problem p03845 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=int(input())
time=0
for i in l:
  time+=int(i)
for i in range(m):
  p,x=map(int,input().split())
  print(time-l[p-1]+x)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(input())
m=int(input())
time=0
for i in l:
  time+=i
for i in range(m):
  p,x=map(int,input().split())
  print(time-l(p-1)+x)
Problem p03854 (python)

Fixed submission:
s=list(input())
booler=True
while s!=[] and booler==True:
  if s[-5]=="d" and s[-4]=="r" and s[-3]=="e" and s[-2]=="a" and s[-1]=="m":
    for i in range(5):
      del s[-1]
  elif s[-5]=="e" and s[-4]=="r" and s[-3]=="a" and s[-2]=="s" and s[-1]=="e":
    for i in range(5):
      del s[-1]
  elif s[-6]=="e" and s[-5]=="r" and s[-4]=="a" and s[-3]=="s" and s[-2]=="e" and s[-1]=="r":
    for i in range(6):
      del s[-1]
  elif s[-7]=="d" and s[-6]=="r" and s[-5]=="e" and s[-4]=="a" and s[-3]=="m" and s[-2]=="e" and s[-1]=="r":
    for i in range(7):
      del s[-1]
  else:
    booler=False
if booler:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
s=list(input())
booler=True
while s!=[] and booler==True:
  if s[-5]=="d" and s[-4]=="r" and s[-3]=="e" and s[-2]=="a" and s[-1]=="m":
    for i in range(5):
      del s[-1]
  elif s[-6]=="e" and s[-5]=="r" and s[-4]=="a" and s[-3]=="s" and s[-2]=="e" and s[-1]=="r":
    for i in range(6):
      del s[-1]
  elif s[-5]=="e" and s[-4]=="r" and s[-3]=="a" and s[-2]=="s" and s[-1]=="e":
    for i in range(5):
      del s[-1]
  elif s[-7]=="d" and s[-6]=="r" and s[-5]=="e" and s[-4]=="a" and s[-3]=="m" and s[-2]=="e" and s[-1]=="r":
    for i in range(7):
      del s[-1]
  else:
    booler=False
if booler:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
s=list(input())
booler=True
while s!=[]:
  if s[-5]=="d" and s[-4]=="r" and s[-3]=="e" and s[-2]=="a" and s[-1]=="m":
    for i in range(5):
      del s[-1]
  elif s[-6]=="e" and s[-5]=="r" and s[-4]=="a" and s[-3]=="s" and s[-2]=="e" and s[-1]=="r":
    for i in range(6):
      del s[-1]
  elif s[-5]=="e" and s[-4]=="r" and s[-3]=="a" and s[-2]=="s" and s[-1]=="e":
    for i in range(5):
      del s[-1]
  elif s[-7]=="d" and s[-6]=="r" and s[-5]=="e" and s[-4]=="a" and s[-3]=="m" and s[-2]=="e" and s[-1]=="r":
    for i in range(7):
      del s[-1]
  else:
    booler=False
if b:
  print("YES")
else:
  print("NO")
Problem p03862 (python)

Fixed submission:
n,m=map(int,input().split())
l=list(map(int,input().split()))
count=0
if l[0]>m:
  count+=-m+l[0]
  l[0]=m
for i in range(1,n):
  if l[i-1]+l[i]>m:
    count+=l[i]+l[i-1]-m
    l[i]=m-l[i-1]   
print(count)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
l=list(map(int,input().split()))
count=0
if l[i]>m:
  count+=-m+l[i]
  l[i]=m
for i in range(1,n):
  if l[i-1]+l[i]>m:
    count+=l[i]+l[i-1]-m
    l[i]=m-l[i-1]   
print(count)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
l=list(map(int,input().split()))
count=0
if l[i]>m:
  count+=m-l[i]
  l[i]=m
for i in range(1,n):
  if l[i-1]+l[i]>m:
    count+=l[i]+l[i-1]-m
    l[i]=m-l[i-1]   
print(count)
Problem p03962 (python)

Fixed submission:
a=list(map(int,input().split()))
print(len(set(a)))

Buggy submission (verdict: Runtime Error):
n=int(input())
l=0
p=0
for i in range(1,n+1):
  b,m=map(int,input().split())
  if l!=b+m:
    l=(l//(b+m)+1)*(b+m)
  else:
    pass
print(l)
Problem p03994 (python)

Fixed submission:
w=input()
nw=len(w)
lw=list(w)
n=int(input())
alpha="qwertyuiopasdfghjklzxcvbnm"
l=sorted(list(alpha))
d={}
for i in range(26):
  d[l[i]]=i
num=n
count=0
while num>0 and count<nw:
  if lw[count]=="a":
    count+=1
  else:
    letter=lw[count]
    if 27-d[letter]-1<=num:
      num-=27-d[letter]-1
      lw[count]="a"
      count+=1
    else:
      count+=1
if num>0:
  a=lw[-1]
  num1=d[a]
  lw[-1]=l[(num1+num)%26]
print("".join(lw))

Buggy submission (verdict: Runtime Error):
w=input()
nw=len(w)
lw=list(w)
n=int(input())
alpha="qwertyuiopasdfghjklzxcvbnm"
l=sorted(list(alpha))
d={}
for i in range(26):
  d[l[i]]=i+1
num=n
count=0
while num>0 and count<nw:
  if lw[count]=="a":
    count+=1
  else:
    letter=lw[count]
    if 27-d[letter]<num:
      num-=27-d[letter]
      lw[count]="a"
      count+=1
    else:
      count+=1
if num>0:
  a=lw[-1]
  num1=d[a]
  lw[-1]=l[num1+num-1]
print("".join(lw))
Problem p03998 (python)

Fixed submission:
a=list(input())
b=list(input())
c=list(input())
t="a"
a.append(0)
b.append(0)
c.append(0)
while a!=[] and b!=[] and c!=[]:
  if t=="a":
    t=a[0]
    del a[0]
  elif t=="b":
    t=b[0]
    del b[0]
  else:
    t=c[0]
    del c[0]
if a==[]:
  print("A")
elif b==[]:
  print("B")
else:
  print("C")

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
t="a"
while a!=[] and b!=[] and c!=[]:
  if t=="a":
    t=a[0]
    del a[0]
  elif t=="b":
    t=b[0]
    del b[0]
  else:
    t=c[0]
    del c[0]
if a==[]:
  print("A")
elif b==[]:
  print("B")
else:
  print("C")
Problem p04012 (python)

Fixed submission:
alpha=["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"]
word=input()
T=True
for i in alpha:
  if word.count(i)%2==1:
    T=False
    break
if T==True:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
word=input()
list=set(word)
T=True
for i in list:
  if word.count(i)%2==1:
    T=False
if T=True:
  print("Yes")
else:
  print("No")
Problem p04045 (python)

Fixed submission:
n,m=map(int,input().split())
l=list(map(int,input().split()))
b=True
while b:
  b1=False
  l1=list(str(n))
  for i in l1:
    if int(i) in l:
      b1=True
  if b1==False:
    b=False
    print(n)
    break
  else:
    n+=1

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
l=list(map(int,input().split()))
b=True
while b:
  b1=False
  l1=list(str(n))
  for i in l1:
    if i in l:
      b1=True
  if b1=False:
    b=True
    print(n)
    break
  else:
    n+=1
Problem p04047 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
l=sorted(l)
z=0
for i in range(n):
  z+=l[2*i]
print(z)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
l=set(l)
z=0
for i in range(n):
  z+=l[2*i]
print(z)
Problem p02687 (python)

Fixed submission:
I = input()
print("ABC" if I == "ARC" else "ARC")

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
D = []
E = set()
total = A
for i in range(B):
    C = int(input())
    D = map(int, input().split())
    E.add(D)
for i in range(1, A+1):
  if str(i) in str(E):
    total = total - 1
print(total)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
D = set()
E =[]
total = A
for i in range(B):
    C = int(input())
    D = map(int, input().split())
    E.append(list(D))
for i in range(1, A+1):
  if str(i) in str(E):
    total = total - 1
print(total)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
D = []
E = []
total = A
for i in range(B):
    C = int(input())
    D = map(int, input().split())
    E.append(list(D))
for i in range(1, A+1):
  if str(i) in str(E):
    total = total - 1
print(total)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
D = []
E = []
total = A
for i in range(B):
    C = int(input())
    D = map(int, input().split())
    E.append(list(D))
for i in range(A):
  if str(i+1) in str(E):
    total = total - 1
print(total)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
D = []
E = []
total = A
for i in range(B):
    C = int(input())
    D = map(int, input().split())
    E.append(list(D))
 
for i in range(A):
  if str(i+1) in str(E):
    total = total - 1
 
print(total)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
E = []
total = A
for i in range(B):
    C = int(input())
    D = map(int, input().split())
    E.append(list(D))

for i in range(A):
  if str(i+1) in str(E):
    total = total - 1

print(total)
Problem p02705 (python)

Fixed submission:
import math

r=float(input())

L=2*math.pi*r

print(L)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = sum(c)
print(a-d)
Problem p02830 (python)

Fixed submission:
# @Author: Amit Dwivedi
# @Date:   2019-12-22 11:55:43
# @Last Modified by:   Amit Dwivedi
# @Last Modified time: 2019-12-22 12:04:16
ll= lambda : list(map(int,input().split()))
testcases=1
# testcases=int(input())
for testcase in range(testcases):
	[n] = ll()
	s,t = input().split()
	for i in range(n):
		print(s[i],t[i],sep = "",end = "")

Buggy submission (verdict: Runtime Error):
# @Author: Amit Dwivedi
# @Date:   2019-12-22 11:55:43
# @Last Modified by:   Amit Dwivedi
# @Last Modified time: 2019-12-22 12:04:16
ll= lambda : list(map(int,input().split()))
testcases=1
# testcases=int(input())
for testcase in range(testcases):
	[n] = ll()
	s,t = input().split()
	for i in range(n):
		print(s[i],t[i],sep = "",end =
Problem p02727 (python)

Fixed submission:
x, y ,a,b,c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
 
list.sort(p,reverse=True)
list.sort(q,reverse=True)
list.sort(r,reverse=True)
 
mazemaze =p[:x]+q[:y]+r
list.sort(mazemaze, reverse=True)
print(sum(mazemaze[:x+y]))

Buggy submission (verdict: Runtime Error):
'''

2 2 4 4 4
11 12 13 14
21 22 23 24
1 2 3 4

'''
o=input().rstrip().split(' ')
x=int(o[0])
y=int(o[1])
a=int(o[2])
b=int(o[3])
c=int(o[4])
H=0;
R=input().rstrip().split(' ')
G=input().rstrip().split(' ')
ANY=input().rstrip().split(' ')
R.sort(key=int,reverse=True)
G.sort(key=int,reverse=True)
ANY.sort(key=int,reverse=True)
while(x>0):
    if int(R[0]) > int(ANY[0]):
        H+=int(R[0])
        del(R[0])
        x-=1;
    else:
        break;
while(y>0):
    if int(G[0]) > int(ANY[0]):
        H+=int(G[0])
        del(G[0])
        y-=1;
    else:
        break;
if(x>0 and y==0):
    for i in range(0,x):
        if i<len(ANY):
            H+=ANY[i];
        else:
            H+=int(R[0])
            del(R[0])
elif(y>0 and x==0):
    for i in range(0,y):
        if i<len(ANY):
            H+=int(ANY[i]);
        else:
            H+=int(G[0])
            del(G[0])
else:
    FF=x+y;
    if FF<=len(ANY):
        for i in range(0,FF):
            H+=int(ANY[i])
    else:
        for i in range(0,len(ANY)):
            H+=int(ANY[i])
            if x>0 and int(R[0]) <= int(G[0]):
                del(R[0])
                x-=1;
            elif y>0 and int(G[0]) <= int(R[0]):
                del(G[0])
                y-=1;
        XX=x;
        YY=y;
        for i in range(0,XX):
            H+=int(R[0])
            del(R[0])
        for i in range(0,YY):
            H+=int(G[0])
            del(G[0])
print(H)
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
 
amari = N % 500
if amari <= A:
  print("Yes")
else:
  print("No")

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

amari = N % 500
if amari <= A:
  print("YES")
else:
  print("NO")