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

Fixed submission:
s=int(input())
G =[]
while (s not in G):
  G.append(s)
  if s % 2==0:
    s = int(s//2)
  else:
    s = int(3*s+1)
print(len(G)+1)

Buggy submission (verdict: Runtime Error):
s=int(input())
G =[s]
while all(G[i]!=G[-1] for i in range(len(G)-1)):
  if G[-1] % 2==0:
    G.append(int(x/2))
  else:
    G.append(int(3*x+1))
print(len(G))
Problem p03206 (python)

Fixed submission:
print("Christmas"+" Eve"*(25-int(input())))

Buggy submission (verdict: Runtime Error):
print("Chistmas"+" Eve"+(25-int(input())))

Buggy submission (verdict: Runtime Error):
print("Chistmas"+" Eve"+(25-input()))
Problem p03211 (python)

Fixed submission:
s = input()
a = []
for i in range(len(s)-2):
  a.append(abs(int(s[i])*100+int(s[i+1])*10+int(s[i+2])-753))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(str(s))-2):
  a.extend(abs(int(s[i])*100+int(s[i+1])*10+int(s[i+2])-753))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(str(s))-2):
  a.extend(abs(inst(s[i])*100+int(s[i+1])*10+int(s[i+2])-753))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(str(s))-2):
  a.extend(abs(s[i]*100+s[i+1]*10+s[i+2]-753))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(str(s))-2):
  a.append(abs(s[i]*100+s[i+1]*10+s[i+2]-753))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(str(s))-2):
  a.append(int(abs(s[i]*100+s[i+1]*10+s[i+2]-753)))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(s)-2):
  a.append(int(abs(s[i]*100+s[i+1]*10+s[i+2]-753)))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(s)-2):
  a.append(abs(s[i]*100+s[i+1]*10+s[i+2]-753))
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = [0]*(len(s)-2)
for i in range(len(s)-2):
  a[i]==abs(s[i]*100+s[i+1]*10+s[i+2]-753)
print(min(a))

Buggy submission (verdict: Runtime Error):
s = input()
a = [0]*(len(s)-2)
for i in range(len(s)-2):
  a[i]==abs(a[i]*100+a[i+1]*10+a[i+2]-753)
print(min(a))
Problem p03212 (python)

Fixed submission:
n = input()
from itertools import product
sum = 0
for i in range(len(n)-2):
  for j in list(product("753", repeat=i+3)):
    if int(''.join(j)) <= int(n) and len(set(j))==3:
      sum+=1
print(sum)

Buggy submission (verdict: Runtime Error):
n = input()
from itertools import product
from collectins import Counter
sum = 0
for i in range(len(n)-2):
  for j in list(product("753", repeat=i+3)):
    if int(''.join(j)) <= int(n) and len(Counter(j))==3:
      sum+=1
print(sum)

Buggy submission (verdict: Runtime Error):
n = input()
from itertools import product
from collectins import Counter
sum = 0
for i in range(len(n)-2):
  for j in product("753", repeat=i+3):
    if int(''.join(j)) <= int(n) and len(Counter(j))==3:
      sum+=1
print(sum)
Problem p03220 (python)

Fixed submission:
n = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
TH = []
for i in range(n):
  TH.append(abs(A-T+0.006*H[i]))
print(TH.index(min(TH))+1)

Buggy submission (verdict: Runtime Error):
n = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
TH = []
for i in n:
  TH.append(abs(T-int(T-0.006*H[i])))
print(TH.index(min(TH))+1)
Problem p03238 (python)

Fixed submission:
n= int(input())
if n == 1:
  print("Hello World")
  exit()
else:
  a = int(input())
  b = int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n= int(input())
if n = 1:
  print("Hello World")
  exit()

a = int(input())
b = int(input())
print(a+b)

Buggy submission (verdict: Runtime Error):
n= int(input())
if n = 1:
  print("Hello World")
  exit()
else:
  a = int(input())
  b = int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n= int(input())
if n = 1:
  print("Hello World")
elif n = 2:
  a = int(input())
  b = int(input())
  print(a+b)
Problem p03239 (python)

Fixed submission:
N,T = map(int,input().split())
m = 1001
for i in range(N):
  c,t=map(int,input().split())
  if t<=T:
    m = min(m,c)
print("TLE" if m == 1001 else m)

Buggy submission (verdict: Runtime Error):
a,b=map(int,inpu().split())
meta = int(a)
for i in range(a):
  x,y = map(int,input().split())
  if b > y and a > x:
    a = x
if meta > a:
  print(a)
else:
  print("TLE")

Buggy submission (verdict: Runtime Error):
a,b=map(int,inpu().split())
x,y = [list(map(int,input().split())) for i in range(a)]
if b < max(y):
  print("TLE")
else:
  for i in range(a):
    if b > y[i] and a > x[i]:
      a = x[i]
  print(a)

Buggy submission (verdict: Runtime Error):
a,b=map(int,inpu().split())
x,y = [list(map(int,input().split())) for i in range(a)]
for i in range(a):
  if b > y[i] and a > x[i]:
    a = x[i]
print(a)
Problem p03244 (python)

Fixed submission:
n = int(input())
alist  = list(map(int,input().split()))
list1 = alist[1::2]
list2 = alist[0::2]
from collections import Counter
dic1 = Counter(list1).most_common()
dic2 = Counter(list2).most_common()
dic1.append([0,0])
dic2.append([0,0])
if dic1[0][0]!=dic2[0][0]:
  print(n - dic1[0][1] - dic2[0][1])
else:
  print(min(n - dic1[0][1] - dic2[1][1], n -dic1[1][1] - dic2[0][1]))

Buggy submission (verdict: Runtime Error):
n = int(input())
alist  = list(map(int,input().split()))
list1 = alist[1::2]
list2 = alist[0::2]
from collections import Counter
dic1 = Counter(list1).most_common()
dic2 = Counter(list2).most_common()
dic1.append([0,0])
dic2.append([0,])
if dic1[0][0]!=dic2[0][0]:
  print(n - dic1[0][1] - dic2[0][1])
else:
  print(min(n - dic1[0][1] - dic2[1][1], n -dic1[1][1] - dic2[0][1]))

Buggy submission (verdict: Runtime Error):
n = int(input())
alist  = list(map(int,input().split()))
list1 = alist[1::2]
list2 = alist[0::2]
from collections import Counter
dic1 = Counter(list1)
dic2 = Counter(list2)
sortdic1 = sorted(dic1.items(),key=lambda x:x[1], reverse=True)
sortdic2 = sorted(dic2.items(),key=lambda x:x[1], reverse=True)
vlist1 = list(sortdic1.items())
vlist2 = list(sortdic2.items())
if vlist1[0][0]!=vlist2[0][0]:
  print(n - vlist1[0][1] - vlist2[0][1])
else:
  if (vlist1[0][1] + vlist2[1][1])>(vlist1[1][1] + vlist2[0][1]):
    print(n - vlist1[0][1] - vlist2[1][1])
  else:
    print(n -vlist1[1][1] - vlist2[0][1])

Buggy submission (verdict: Runtime Error):
n = int(input())
alist  = list(map(int,input().split()))
list1 = alist[1::2]
list2 = alist[0::2]
from collections import Counter
dic1 = Counter(list1)
dic2 = Counter(list2)
sortdic1 = sorted(dic1.items(),key=lambda x:x[1], reverse=True)
sortdic2 = sorted(dic2.items(),key=lambda x:x[1], reverse=True)
vlist1 = list(sortdic1.items())
vlist2 = list(sortdic2.items())
if vlist1[0][0]!=vlist[0][0]:
  print(n - vlist1[0][1] - vlist2[0][1])
else:
  if (vlist1[0][1] + vlist2[1][1])>(vlist1[1][1] + vlist2[0][1]):
    print(n - vlist1[0][1] - vlist2[1][1])
  else:
    print(n -vlist1[1][1] - vlist2[0][1])

Buggy submission (verdict: Runtime Error):
n = int(input())
alist  = list(map(int,input().split()))
list1 = alist[1::2]
list2 = blist[0::2]
from collections import Counter
dic1 = Counter(list1)
dic2 = Counter(list2)
vlist1 = sorted(list(dic1.values()))
vlist2 = sorted(list(dic2.values()))
print(n - vlist1[-1] - vlist2[-1])

Buggy submission (verdict: Runtime Error):
n = int(input())
alist  = list(map(int,input().split()))
from collections import Counter
adic = Counter(alist)
vlist = sorted(list(adic.values()))
print(n - vlist[-1] - vlist[-2])
Problem p03261 (python)

Fixed submission:
n = int(input())
alist = [input() for i in range(n)]
 
if len(set(alist))==n:
  if all(alist[i][-1]==alist[i+1][0] for i in range(n-1)):
    print("Yes")
    exit()
print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
alist = [input() for i in range(n)]
 
if len(set(alist))==n:
  if all(alist[i][-1]==alist[i+1][0])for i in range(n-1):
    print("Yes")
  else:
    print("No")

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

for i in range(n):
  if all(alist[i][-1]==alist[i+1][0]):
    if len(set(alist))==n:
      print("Yes")
    else:
      print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
alist = [list(input()) for i in range(n)]
for i in range(n):
  for j in range(i+1,n):
    if alist[i] == alist[j]:
      print("No")
      exit()
for i in range(n):
  if all(alist[i][-1]==alist[i+1][0]):
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
alist = [str(input()) for i in range(n)]
for i in range(n):
  for j in range(i+1,n):
    if alist[i] == alist[j]:
      print("No")
      exit()
for i in range(n):
  if all(alist[i][-1]==alist[i+1][0]):
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
alist = [input() for i in range(n)]
for i in range(n):
  for j in range(i+1,n):
    if alist[i] == alist[j]:
      print("No")
      exit()
for i in range(n):
  if all(alist[i][-1]==alist[i+1][0]):
    print("Yes")
  else:
    print("No")
Problem p03262 (python)

Fixed submission:
n,x=map(int,input().split())
xlist= list(map(int,input().split()))
if n == 1:
  print(abs(xlist[0]-x))
  exit()
ylist = []
for i in range(n):
  ylist.append(abs(xlist[i]-x))
from functools import reduce
from math import gcd
print(reduce(gcd,ylist))

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
xlist= list(map(int,input().split()))
xlist.append(x)
xsort = sorted(xlist, reverse=True)
ylist = []
for i in range(n-1):
  ylist.append(xsort[i]-xsort[i+1])
from functools import reduce
from math import gcd
print(reduce(gcd,ylist))
Problem p03289 (python)

Fixed submission:
s = list(input())
flg = "WA"
if s[0]=="A":
  if "C" in s[2:len(s)-1]:
    s.remove("A")
    s.remove("C")
    s = ''.join(s)
    if s.islower()==True:
      flg = "AC"
print(flg)

Buggy submission (verdict: Runtime Error):
s = list(input())
flg = "WA"
if s[0]=="A":
  if "C" in s[2:len(s)-1]:
    s.remove("A")
    s.remove("C")
    s = *s
    if s.islower()==True:
      flg = "AC"
print(flg)

Buggy submission (verdict: Runtime Error):
s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s = s.pop(0)
  
if "C" in s[2:len(s)-1]:
  s = s.replace("C","",1)
  
if s.islower()==True:
  print("AC")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
if "C" in s[2:len(s)-1]:
  s.replace("C","",1)
  
if s.islower()==True:
  print("AC")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
if "C" in s[2:len(s)-1]:
  s.replace("C","",1)
  
if s.islower():
  print("AC")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
count =0
for i in range(1,-2):
  if s[i] == "C":
    s.pop(i)
    count+=1    
if count !=1:
  print("WA")
  exit()
  
if s.islower():
  print("AC")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
count =0
for i in range(1,-2):
  if s[i] == "C":
    s.pop(i)
    count+=1
  else:
    continue
    
if count !=1:
  print("WA")
  exit()
else:
  continue
  
if s.islower():
  print("AC")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  if s[1]!="C" or s[-2]!="C":
    print("WA")
    exit()
  else:
    s.pop(1)
    s.pop(-2)
    if s.islower():
      print("AC")
    else:
      print("WA")
Problem p03352 (python)

Fixed submission:
x=int(input())
c=1
for b in range(1,32):
    for p in range(2,10):
        if b**p<=x:
          c=max(c,b**p)
        else:break
print(c)

Buggy submission (verdict: Runtime Error):
x = int(input())
ans = []
for i in range(x):
  for j in range(x):
    if i**j < x and x < i**(j+1):
      ans.append(int(i**j))
print(max(ans))

Buggy submission (verdict: Runtime Error):
x = int(input())
import math
a = math.sqrt(x)
b = a - a%1
ans = []
for i in range(b):
  for j in range(b):
    if i**j < x and x < i**(j+1):
      ans.append(int(i**j))
print(max(ans))

Buggy submission (verdict: Runtime Error):
x = int(input())
import math
a = math.sqrt(x)
b = a - a%1
ans = []
for i in range(b):
  for j in range(b):
    if i**j < x and x < i**(j+1):
      ans.append(i**j)
print(max(ans))
Problem p03378 (python)

Fixed submission:
n,m,x = map(int,input().split())
a = list(map(int,input().split()))
s = len(a)
ans = 0
for i in a:
  if i < x:
    ans+=1
print(min(ans,s-ans))

Buggy submission (verdict: Runtime Error):
N,M,X=map(int,input().split())
a = [int(input()) for in range(M)]
count_low = 0
count_high = 0
for i in range(a):
  if a[i-1]<X:
    count_low +=1
for i in range(a):
  if a[i-1]>X:
    count_high +=1
print(min(count_low,count_high))

Buggy submission (verdict: Runtime Error):
N,M,X=map(int,input().split())
a = [int(input()) for in range(M)]
count_low = 0
count_high = 0
for i in range(M):
  if a[i-1]<X:
    count_low +=1
for i in range(M):
  if a[i-1]>X:
    count_high +=1
Problem p03386 (python)

Fixed submission:
a,b,k=map(int,input().split())
if b-a+1>k*2:
  for i in range(a,a+k):
    print(i)
  for j in range(b-k+1,b+1):
    print(j)
else:
  for h in range(a,b+1):
    print(h)

Buggy submission (verdict: Runtime Error):
a,b,n=map(int,input().split())
enda = min(a+n,b)
stab = max(a,b-n)
C = sorted(set(list(range(a,enda)))|set(list(range(stab+1:b+1))))
for i in C:
  print(i)

Buggy submission (verdict: Runtime Error):
a,b,n=map(int,input().split())
C = sorted(set([a:min(a+n,b)])|set([max(a,b-n):b]))
for i in C:
  print(i)

Buggy submission (verdict: Runtime Error):
a,b,n=map(int,input().split())
C = set(set([a:min(a+n,b)])|set([max(a,b-n):b]))
for i in list(C):
  print(i)

Buggy submission (verdict: Runtime Error):
a,b,n=map(int,input().split())
C = set(set([a:min(a+n,b)])|set([max(a,b-n):b]))
for i in C:
  print(i)

Buggy submission (verdict: Runtime Error):
a,b,n=map(int,input().split())
C = set([a:min(a+n,b)])|set([max(a,b-n):b])
for i in list(C):
  print(i)

Buggy submission (verdict: Runtime Error):
a,b,n=map(int,input().split())
C = [a:min(a+n,b)]|[max(a,b-n):b]
for i in C:
  print(i)

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if b-a+1>k*2:
  print([a:a+k]+[b-k:b],end="\n")
else:
  print([a:b],end="\n")
Problem p03408 (python)

Fixed submission:
x = int(input())
a = [input() for _ in range(x)]
y = int(input())
b = [input() for _ in range(y)]

count_max = 0
for j in a:
  if (a.count(j) - b.count(j)) > count_max:
    count_max = a.count(j) - b.count(j)
print(count_max)

Buggy submission (verdict: Runtime Error):
x = int(input())
a = [input() for i in range(x)]
y = int(input())
b = [input() for h in range(y)]

count_max = 0
for j in a:
  if (a.count(j) - b.count(j)) > count_max:
    a.count(j) - b.count(j) = count_max
print(count_max)

Buggy submission (verdict: Runtime Error):
x = int(input())
a = [input() for i in range(x)]
y = int(input())
b = [input() for h in range(y)]

count_max = 0
for j in a:
  if a.count(j) - b.count(j) > count_max:
    a.count(j) - b.count(j) = count_max
print(count_max)

Buggy submission (verdict: Runtime Error):
x = int(input())
a = [input() for i in range(x)]
y = int(input())
b = [input() for i in range(y)]

count_max = 0
for i in a:
  if x.count(i) - y.count(i) > count_max:
    x.count(i) - y.count(i) = count_max
print(count_max)

Buggy submission (verdict: Runtime Error):
x = int(input())
a = [input() for i in range(x)]
y = int(input())
b = [input() for i in range(y)]

count_max == 0
for i in a:
  if x.count(i) - y.count(i) > count_max:
    x.count(i) - y.count(i) = count_max
print(count_max)

Buggy submission (verdict: Runtime Error):
x = int(input())
a = [input() for i in range(x)]
y = int(input())
b = [input() for i in range(y)]

count_max == 0
for i in range(x):
  if x.count(i) - y.count(i) > count_max:
    x.count(i) - y.count(i) = count_max
print(count_max)
Problem p03415 (python)

Fixed submission:
x = [input() for i in range(3)]
print(x[0][0]+x[1][1]+x[2][2])

Buggy submission (verdict: Runtime Error):
x = list(map(input().split()) for i in range(3))
print(x[0][0]+x[1][1]+x[2][2])

Buggy submission (verdict: Runtime Error):
x = list(map(str,input().split()) for i in range(3))
print(x[0][0]+x[1][1]+x[2][2])

Buggy submission (verdict: Runtime Error):
x = [[str(j) for j in input().split()] for i in range(3)]
print(x[1][1]+x[2][2]+x[3][3])
Problem p03416 (python)

Fixed submission:
a,b=map(int,input().split())
count = 0
for i in range(a,b+1):
  if str(i)[0]==str(i)[4] and str(i)[1]==str(i)[3]:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
a,b=map(str,input().split())
count = 0
for i in range(a,b):
  if i[0]==i[4] and i[1]==i[3]:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
count = 0
for i in range(a,b):
  if i[0]==i[4] and i[1]==i[3]:
    count+=1
print(count)
Problem p03425 (python)

Fixed submission:
n = int(input())
Mnum = 0
Anum = 0
Rnum = 0
Cnum = 0
Hnum = 0
for i in range(n):
  a = input()
  if a[0] == "M":
    Mnum+=1
  elif a[0] == "A":
    Anum+=1
  elif a[0] == "R":
    Rnum+=1
  elif a[0] == "C":
    Cnum+=1
  elif a[0] == "H":
    Hnum+=1
alist = []
alist.append(Mnum)
alist.append(Anum)
alist.append(Rnum)
alist.append(Cnum)
alist.append(Hnum)
from itertools import combinations
print(sum([a*b*c for a,b,c in combinations(alist,3)]))

Buggy submission (verdict: Runtime Error):
n = int(input())
Mnum = 0
Anum = 0
Rnum = 0
Cnum = 0
Hnum = 0
for i in range(n):
  a = input()
  if a[0] == "M":
    Mnum+=1
  elif a[0] == "A":
    Anum+=1
  elif a[0] == "R":
    Rnum+=1
  elif a[0] == "C":
    Cnum+=1
  elif a[0] == "H":
    Hnum+=1
alist = []
alist.append(Mnum)
alist.append(Anum)
alist.append(Rnum)
alist.append(Cnum)
alist.append(Hnum)
from itertools import combinations
blist =list(combinations(alist,3))
from functools import reduce
sum = 0
for i in range(len(blist)):
  sum+=reduce(mul,blist[i])
print(sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
Mnum = 0
Anum = 0
Rnum = 0
Cnum = 0
Hnum = 0
for i in range(n):
  a = input()
  if a[0] == "M":
    Mnum+=1
  elif a[0] == "A":
    Anum+=1
  elif a[0] == "R":
    Rnum+=1
  elif a[0] == "C":
    Cnum+=1
  elif a[0] == "H":
    Hnum+=1
alist = []
alist.append(Mnum)
alist.append(Anum)
alist.append(Rnum)
alist.append(Cnum)
alist.append(Hnum)
from itertools import combinations
blist =list(combinations(alist,3))
from functools import reduce
sum = 0
for i in range(len(blist)):
  sum+=reduce(mul,blist)
print(sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
Mnum = 0
Anum = 0
Rnum = 0
Cnum = 0
Hnum = 0
for i in range(n):
  a = input()
  if a[0] == "M":Mnum+=1
  elif a[0] == "A":Anum+=1
  elif a[0] == "R":Rnum+=1
  elif a[0] == "C":Cnum+=1
  elif a[0] == "H":Hnum+=1
alist = []
alist.append(Mnum)
alist.append(Anum)
alist.append(Rnum)
alist.append(Cnum)
alist.append(Hnum)
from itertools import combinations
blist =list(combinations(alist,3))
from functools import reduce
sum = 0
for i in range(len(blist)):
  sum+=reduce(mul,blist)
print(sum)

Buggy submission (verdict: Runtime Error):
for i in range(n):
  a = input()
  if a[0] == "M":Mnum+=1
  elif a[0] == "A":Anum+=1
  elif a[0] == "R":Rnum+=1
  elif a[0] == "C":Cnum+=1
  elif a[0] == "H":Hnum+=1
alist = []
alist.append(Mnum)
alist.append(Anum)
alist.append(Rnum)
alist.append(Cnum)
alist.append(Hnum)
from itertools import combinations
blist =list(combinations(alist,3))
from functools import reduce
sum = 0
for i in range(len(blist)):
  sum+=reduce(mul,blist)
print(sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
Mnum = 0
Anum = 0
Rnum = 0
Cnum = 0
Hnum = 0
for i in range(n):
  a = input()
  if a[0] == "M":Mnum+=1
  elif a[0] == "A":Anum+=1
  elif a[0] == "R":Rnum+=1
  elif a[0] == "C":Cnum+=1
  elif a[0] == "H":Hnum+=1
alist = [Mnum,Anum,Rnum,Cnum,Hnum]
from itertools import combinations
blist =list(combinations(alist,3))
from functools import reduce
sum = 0
for i in range(len(blist)):
  sum+=reduce(mul,blist)
print(sum)
Problem p03456 (python)

Fixed submission:
a,b=map(int,input().split())
c=int(str(a)+str(b))
for i in range(int(c**(1/2))+1) :
  if i**2==c :
    print("Yes")
    exit()
print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
z = int(str(x)+str(y))
for i in range(int(z**(1/2))+1):
  if i**2 = z:
    print("Yes")
    exit()
print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
z = int(str(x)+str(y))
for i in range(int(z**0.5)+1):
  if i**2 = z:
    print("Yes")
    exit()
print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
z = int(str(x)+str(y))
for i in range(int(z**0.5)):
  if i**2 = z:
    ans = "Yes"
  else:
    ans = "No"
print(ans)

Buggy submission (verdict: Runtime Error):
x,y = map(str,input().split())
z = x+y
Z=int(z)
for i in range(100):
  if i**2 = Z:
    ans = "Yes"
  else:
    ans = "No"
print(ans)

Buggy submission (verdict: Runtime Error):
x,y = map(str,input().split())
z = x+y
Z=int(z)
ans = ""
for i in range(100):
  if i**2 = Z:
    ans = "Yes"
    break
  else:
    ans = "No"
print(ans)

Buggy submission (verdict: Runtime Error):
,y = map(str,input().split())
z = x+y
Z=int(z)
ans = ""
for i in range(100):
  if i**2 = Z:
    ans = "Yes"
    break
  else:
    ans = "No"
print(ans)

Buggy submission (verdict: Runtime Error):
x,y = map(str,input().split())
z = x+y
Z=int(z)
for i in range(100):
  if i**2 = Z:
    ans = "Yes"
    break
  else:
    ans = "No"
print(ans)

Buggy submission (verdict: Runtime Error):
x,y = map(str,input().split())
z = x+y
Z=int(z)
for i in range(100):
  if i**2 = Z:
    print("Yes")
    exit()
print("No")

Buggy submission (verdict: Runtime Error):
x,y = map(str,input().split())
z = x+y
Z=int(z)
for i in range(100):
  if i**2 = Z:
    print("Yes")
  else:
    print("No")
Problem p03469 (python)

Fixed submission:
s = input()
s = s.replace("2017","2018")
print(s)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split("/"))
print("2018/"+b+"/"+c)
Problem p03470 (python)

Fixed submission:
n = int(input())
x = [int(input()) for i in range(n)]
y = set(x)
print(len(y))

Buggy submission (verdict: Runtime Error):
n = int(input())
List=[int(input()) for i in range(n)]
ans = 0
while True
for i,j in range(n):
  if i == j:
    ans +=1
print(n-ans)
Problem p03474 (python)

Fixed submission:
a,b = map(int,input().split())
n = input()
if 1<=a<=5 and 1<=b<=5:
  if n[a]=="-":
    if n[0:a].isdecimal() and n[a+1:a+b+1].isdecimal():
      print("Yes")
      exit()
print("No")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
n = input()
if n[a]=="-":
  n = n.pop(a)
  if n.isdecimal():
    print("Yes")
    exit()
print("No")
Problem p03486 (python)

Fixed submission:
s = sorted(input())
t = sorted(input())[::-1]
if s < t:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = list(input())
t = list(input())
for i in s:
  for j in t:
    if ord(i)<ord(j):
      print("Yes")
      exit()
 
count = 0
if len(s)<len(t):
  for i in range(len(s)):
    if s[i]=t[i]:
      count+=1
  if count = len(s):
    print("Yes")
    exit()
 
print("No")
    
s = list(input())
t = list(input())
for i in s:
  for j in t:
    if ord(i)<ord(j):
      print("Yes")
      exit()

S = sorted(s)
T = sorted(t)
count = 0
if len(s)<len(t):
  for i in range(len(s)):
    if S[i]=S[i]:
      count+=1
  if count = len(s):
    print("Yes")
    exit()

print("No")

Buggy submission (verdict: Runtime Error):
s = list(input())
t = list(input())
for i in s:
  for j in t:
    if ord(i)<ord(j):
      print("Yes")
      exit()

count = 0
if len(s)<len(t):
  for i in range(len(s)):
    if s[i]=t[i]:
      count+=1
  if count = len(s):
    print("Yes")
    exit()

print("No")