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

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
for i in range(n):
  p[i]=(p[i]+1)/2
a=0
for i in range(k):
  a+=p[i]
b=[a]
for j in range(1,n-k+1):
  c=b[j-1]-p[j-1]+p[j+k-1]
  b.append(c)
b.sort(reverse=True)
print(b[0])

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
p=list(map(int,input().split()))
ans = 0
for i in range(k):
  ans += (p[i]+1)/2
for i in range(n-k):
  ans = max(ans,ans-(p[i]+1)/2+(p[k+i+1]+1)/2)
print(ans)
Problem p02783 (python)

Fixed submission:
h,a = map(int,input().split())
print(h//a+1-int(h%a==0))

Buggy submission (verdict: Runtime Error):
h,a = map(int,input().split())
print(h//a + (1-int(h%a==0))

Buggy submission (verdict: Runtime Error):
h,a = map(int,input().split())
print(h//a + (1-(h%a==0))

Buggy submission (verdict: Runtime Error):
h,a = map(int,input())
print(h//a + (1-(h%a==0))
Problem p02784 (python)

Fixed submission:
h,n = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
  ans += a[i]
if(ans>=h):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
h,n = map(int,input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
  ans += a[i]
if(ans>=h):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
h,n = map(int,input())
a = list(map(int,input().split()))
ans = 0
for i in a:
  ans += a[i]
if(ans>=h):
  print("Yes")
else:
  print("No")
Problem p02786 (python)

Fixed submission:
h = int(input())
ans = 0
i = 0
while True:
  if(2**i>=h):
    break
  i+=1
if(i == 0):
  print(1)
elif(2**i==h):
  print(2**(i+1)-1)
else:
  print(2**i-1)

Buggy submission (verdict: Runtime Error):
h = int(input())
ans = 0
i = 0
while True:
  if(i>=h):
    break
  i+=
if(i = 0):
  print(1)
else:
  print(2**(i+1)-1)

Buggy submission (verdict: Runtime Error):
h = int(input())
ans = 0
i = 0
while True:
  if(i>=h):
    break
  break
if(i = 0):
  print(1)
else:
  print(2**(i+1)-1)
Problem p02791 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int,input().split()))
a = p[0]
ans = 0
for i in range(n):
  if(m<=p[i]):
    ans += 1
    a = p[i]
print(ans)
Problem p02818 (python)

Fixed submission:
a,b,k=map(int,input().split())
m = a-k
if(0<=m):
  print(m,b)
else:
  l = 0-m
  n = b-l
  if(0<=n):
    print(0,n)
  else:
    print(0,0)

Buggy submission (verdict: Runtime Error):
a､b､k=map(int,input().split())
m = a-k
if(0<=m):
  print(m,b)
else:
  l = 0-m
  n = b-l
  if(0<=n):
    print(0,n)
  else:
    print(0,0)

Buggy submission (verdict: Runtime Error):
a､b､k=map(int,input().split())
m = a-k
if(m>=0):
  print(m,b)
else:
  l = 0-m
  n = b-l
  if(n>=0):
    print(0,n)
  else:
    print(0,0)
Problem p02830 (python)

Fixed submission:
N = int(input())
s,t = map(str,input().split())
ans = ""
for i in range(N):
  ans+=s[i]
  ans+=t[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s,t = map(str,input().split())
ans = ""
for i in range(N):
  ans.append(s[i])
  ans.append(t[i])
print(ans)
Problem p02887 (python)

Fixed submission:
n = int(input())
s = str(input())
s += "A"
q = s[0]
ans = 0
for i in range(n+1):
  if(q==s[i]):
    None
  else:
    ans += 1
    q = s[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
s += "A"
q = s[0]
ans = 0
for i in range(n+1):
  if(q==s[i]):
    None:
  else:
    ans += 1
    q = s[i]
print(ans)
Problem p02958 (python)

Fixed submission:
N = int(input())
p = list(map(int,input().split()))
cou = 0
for i in range(1,N+1):
  if(p[i-1]==i):
    None
  else:
    cou += 1
if (cou>2):
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
N = int(input())
p = list(map(int,input().split()))
cou = 0
for i in range(1,N+1):
  if(p[i-1]==n):
    None
  else:
    cou += 1
if (cou>2):
  print("NO")
else:
  print("YES")
Problem p02988 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
p = list(int,input().split())
ans = 0
for i in range(1,N-1):
  if (p[i]<p[i+1])and(p[i]>p[i-1]):
    ans += 1
  elif(p[i]>p[i+1])and(p[i]<p[i-1]):
    ans += 1
  else:
    None
print(ans)
Problem p02993 (python)

Fixed submission:
s = str(input())
ans = "Good"
for i in range(10):
  k = str(i)+str(i)
  if(k in s):
    ans = "Bad"
    break
print(ans)

Buggy submission (verdict: Runtime Error):
s = int(input())
ans = "Good"
for i in range(10):
  k = str(i)+str(i)
  if(k in s):
    ans = "Bad"
    break
print(ans)

Buggy submission (verdict: Runtime Error):
S= str(input())
cou = 0
for i in range(len(S)-1):
  if(S[i]==S[i+1]):
    cou += 1
  break
if(cou=1):
  print("Bad")
else:
  print("Good")
Problem p02996 (python)

Fixed submission:
N = int(input())
task = []
for i in range(N):
  M = list(map(int,input().split()))
  M[0],M[1]=M[1],M[0]
  task.append(M)
task.sort()
K = 0
ans = 1
for i in range(N):
  K += task[i][1]
  if (K>task[i][0]):
    ans = 0
    break
if ans:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
task = []
for i in range(N):
  M = list(map(int,input().split()))
  M[0],M[1]=M[1],M[0]
  task.append(M)
task.sort()
K = 0
ans = 1
for i in range(N):
  K += task[i,1]
  if (K>task[i,0]):
    ans = 0
    break
if ans:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
task = []
for i in range(N):
  M = list(map(int,input().split()))
  swap(M[0],M[1])
  task.append(M)
task.sort()
K = 0
ans = 1
for i in range(N):
  K += task[i,1]
  if (K>task[i,0]):
    ans = 0
    break
if ans:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
task = []
for i in range(N):
  M = list(map(int,input().split()))
  task.append(M)
task.sort(1)
K = 0
ans = 1
for i in range(N):
  K += task[i,0]
  if (K>task[i,1]):
    ans = 0
    break
if ans:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import itemgetter
N = int(input())
task = []
for i in range(N):
  M = list(map(int,input().split()))
  task.append(M)
task.sort(key = itemgetter(1))
K = 0
ans = 1
for i in range(N):
  K += task[i,0]
  if (K>task[i,1]):
    ans = 0
    break
if ans:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import itemgetter()
N = int(input())
task = []
for i in range(N):
  M = list(map(int,input().split()))
  task.append(M)
task.sort(key = itemgetter(1))
K = 0
ans = 1
for i in range(N):
  K += task[i,0]
  if (K>task[i,1]):
    ans = 0
    break
if ans:
  print("Yes")
else:
  print("No")
Problem p03035 (python)

Fixed submission:
A,B = map(int,input().split())
if(A<=5):
  print(0)
else:
  if(A<13):
    V = B//2
    print(V)
  else:
    print(B)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if(A<=5):
  print(0)
else:
  if(A<13):
    V = B//2
    print(V)
  else:
    print(B)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if(A<=5):
  print(0)
else:
  if(A<13):
    V = B/2
    print(V)
  else:
    print(B)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if(A>=13):
  print(B)
elif(13>A)and(A>5):
  print(B/2)
else:
  print(0)
Problem p03068 (python)

Fixed submission:
N = int(input())
S = str(input())
K = int(input())
H = ""
for i in range(N):
  if(S[i]==S[K-1]):
    H+=S[i]
  else:
    H+="*"
print(H)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(input())
K = int(input())
H = ""
for i in range(N):
  if(SS[i]==SS[K-1]):
    H+=SS[i]
  else:
    H+="*"
print(H)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(input())
K = int(input())
SS = list(S)
for i in range(N):
  if(SS[i]==SS[K]):
    None
  else:
    SS[i] = "*"
SSS = str(SS)
print(SSS)
Problem p03085 (python)

Fixed submission:
b = str(input())
if (b == "A"):
  print("T")
elif (b == "T"):
  print("A")
elif (b == "C"):
  print("G")
elif (b == "G"):
  print("C")

Buggy submission (verdict: Runtime Error):
b = str(input())
if (b == "A"):
  print("T")
elif (b == "T"):
  print("A")
elif (b == "c"):
  print("G")
elif (b == "G")
  print("C")

Buggy submission (verdict: Runtime Error):
b = str(input())
if b == "A":
  pritn("T")
elif b == "T":
  print("A")
elif b == "c":
  print("G")
else:
  print("C")

Buggy submission (verdict: Runtime Error):
b = str(input())
if b == "A":
  pritn("T")
elif b == "T":
  print("A")
elif b == "c":
  print("G")
else:
  print("C")
Problem p03228 (python)

Fixed submission:
A,B,K=map(int, input().split())
List = [A,B]
for i in range(K):
  if(List[i]%2==1):
    List[i]=(List[i]-1)//2
    List[i+1]=List[i+1]+List[i]
    List.append(List[i])
  else:
    List[i]=(List[i])//2
    List[i+1]=List[i+1]+List[i]
    List.append(List[i])
#print(List[-3],List[-2])
if(K%2==1):
  print(List[-1],List[-2])
else:
  print(List[-2],List[-1])

Buggy submission (verdict: Runtime Error):
A,B,K=map(int, input().split())
List = [A,B]
for i in range(K):
  if(List[i]%2==1):
    List[i]=(list[i]-1)//2
    List[i+1]=list[i+1]+List[i]
    List.append(List[i])
  else:
    List[i]=(list[i])//2
    List[i+1]=list[i+1]+List[i]
    List.append(List[i])
print(List[-2],List[-1])
Problem p03239 (python)

Fixed submission:
N,T = map(int,input().split())
a = []
for i in range(N):
  c,t = map(int,input().split())
  if(t<=T):
    a.append(c)
if(len(a)==0):
  print("TLE")
else:
  a.sort()
  print(a[0])

Buggy submission (verdict: Runtime Error):
n,T = list(map(int,input().split()))
ans = 10000
for i in range(n):
  c,t = map(int,input().split())
  if(t<=T):
    ans=min(ans,c)
  else:
    None
if(ans = 10000):
  print("TLE")
else:
  print(ans)
Problem p03261 (python)

Fixed submission:
N = int(input())
w = []
ans = "Yes"
for i in range(N):
  s = str(input())
  if(i>0):
    if(s[0]==w[-1][-1]):
      None
    else:
      ans = "No"
      break
  w.append(s)
j = set(w)
l = len(list(j))
if(N==l):
  None
else:
  ans="No"
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
w = []
ans = "Yes"
for i in range(N):
  s = str(input())
  if(i>0):
    if(s[0]==w[-1][-1]):
      None
    else:
      ans = "No"
      break
  w.append(s)
j = set(N)
l = len(list(j))
if(len(N)==l):
  None
else:
  ans="No"
print(ans)
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split)
print((a-1)*(b-1))
Problem p03325 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
cnt = 0

for i in range(N):
    while A[i] % 2 == 0:
        A[i] = A[i] // 2
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
K = 0
while !(len(A)==0):
for i in range(len(A)):
  if(A[i]%2==0):
    A[i]==A[i]//2
    K+=1
  else:
    del A[i]
print(K)
Problem p03370 (python)

Fixed submission:
n,x = map(int,input().split())
ans = n
mi = 10**4
for i in range(n):
  m = int(input())
  x -= m
  mi = min(m,mi)
ans += (x//mi)
print(ans)

Buggy submission (verdict: Runtime Error):
n,x = map(int,input().split())
ans = n
mi = 10**4
for i in range(n):
  m = int(input())
  x -= m
  mi = min(m,mi)
asn += (x//mi)*mi
print(ans)

Buggy submission (verdict: Runtime Error):
n,x = int(input())
ans = n
mi = 10**4
for i in range(n):
  m = int(input())
  x -= m
  mi = min(m,mi)
print(ans + (x//mi)*mi)
Problem p03419 (python)

Fixed submission:
n,m = map(int,input().split())
if(n==2)or(m==2):
  print(0)
elif(n==1)or(m==1):
  if(n==1)and(m==1):
    print(1)
  else:
    print(max(0,max(n,m)-2))
else:
  print((n-2)*(m-2))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
elif(n==1)or(m==1):
  if(n==1)and(m==1):
    print(1)
  else:
    print(max(0,max(n,m)-2))
else:
  print((n-2)*(m-2))
Problem p03434 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
a.sort(reverse=True)
ans = 0
for i in range(N):
  if(i%2==0):
    ans += a[i]
  else:
    ans-=a[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
a.sort(reverse=True)
ans = 0
for i in range(N):
  if(i%2==0):
    ans+=a[i]
  else:
    ans+=a[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split))
a.sort(reverse=True)
ans = 0
for i in range(N):
  if(i%2==0):
    ans+=a[i]
  else:
    ans+=a[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
a.sort(reverse==True)
ans = 0
for i in range(N):
  if(a%2==0):
    ans += a[i]
  else:
    ans-=a[i]
Problem p03435 (python)

Fixed submission:
c = list
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))
c=[p,q,r]
br = 0
for i in range(2):
  for j in range(2):
    if(c[i][j]+c[i+1][j+1]==c[i][j+1]+c[i+1][j]):
      None
    else:
      br+=1
      break
if(br==0):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
c = list
for i in range(3):
  a=list(map(int,input().split()))
  c.append(a)
br = 0
for i in range(2):
  for j in range(2):
    if(c[i][j]+c[i+1][j+1]==c[i][j+1]+c[i+1][j]):
      None
    else:
      br+=1
      break
if(br==0):
  print("Yes")
else:
  print("No")
Problem p03478 (python)

Fixed submission:
n,a,b=map(int, input().split()) 
total = 0
for i in range(1,n+1):
  m = i
  wa = 0
  while True:
    wa += m % 10
    m = m // 10
    if (m == 0):
      break
  if (wa >= a)and(wa <= b):
    total += i
print(total)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split(),input.split())
counter = 0
for i in range(n):
  wa = 0
  for j in range(4):
    k = i / 10**j
    m = k % 10
    wa += m
  if (a <= m)and(m <= b):
    counter += 1
print(counter)
Problem p03494 (python)

Fixed submission:
n = int(input())
c = list(map(int, input().split()))
k = 1
count = 0
while True:
  q = 0
  for i in range(n):
    if (c[i]%2 ==1):
      q += 1
  if (q > 0):
    break
  else:
    for j in range(n):
      c[j] = c[j] / 2
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
c = list(map(int, input().split()))
k = 1
count = 0
while True:
  for i in range(n):
    k *= c[i]
  l = (k % (2**n))
  if (l == 0):
    for j in range(n):
      c[j] = c[j] / 2
    count += 1
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
c=list(map(int, input().split()))
k = 1
count = 0
while True:
  for i in range(n):
    k *= c[n]
  l = (k % (2**n))
  if (l == 0):
    for j in range(n):
      count += 1
      c[j] = c[j] / 2
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
N=int(input())
c=list(map(int, input().split()))
k = 1
count = 0
while True:
  for i in range(N):
    k = k*c[N]
  c_1 = (c % (2**N))
  if (c_1 == 0):
    for j in range(N):
      count += 1
      c[j] = c[j]/2
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
N=int(input())
c=list(map(int, input().split()))
k = 1
count = 0
while True:
  for i in range(N):
    k = k*c[N]
  c_1 = (c % (2**N))
  if (c_1 == 0):
    for j in range(N):
      c[j] = c[j]/2
  else:
    break
Problem p03597 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
A - int(input())
print(N**2-A)
Problem p03672 (python)

Fixed submission:
s = str(input())
sl = list(s)
ans = 0
del sl[-1]
for i in range(1,len(sl)):
  if(len(sl)%2==0):
    if(sl[:len(sl)//2]==sl[len(sl)//2:]):
      ans = len(sl)
      break
  del sl[-1] 
print(ans)

Buggy submission (verdict: Runtime Error):
s = str(input())
sl = list(s)
ans = 0
del s[-1]
for i in range(1,len(s)):
  if(len(s)%2==0):
    if(s[:len(s2//2)]==s[len(s)//2:]):
      ans = len(s)
      break
print(ans)
Problem p03673 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
  b.append(0)
k = 0
if(n%2==1):
  k = (n-1)//2
  m = -1
else:
  k = n//2
  m = 1
for i in range(n):
  if(i%2==0):
    b[k+m*i//2]=a[i]
  else:
    b[k-m*(i+1)//2]=a[i]
ans = ""
for i in range(n):
  ans += str(b[i])+" "
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
  b.append(0)
k = 0
if(n%2==1):
  k = (n-1)//2
else:
  k = n//2
for i in range(n):
  if(i%2==0):
    print(a[i])
    print(k+i//2)
    b[k+i//2]=a[i]
  else:
     print(a[i])
    b[k-(i+1)//2]=a[i]
print(b)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
  b.append(0)
k = 0
if(n%2==1):
  k = (n-1)/2
else:
  k = n//2
for i in range(n):
  if(i%2==0):
    b[k+i//2]==a[i]
  else:
    b[k-i//2]==a[i]
print(b)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
  b.append(0)
k = 0
if(n%2==1):
  k = (n-1)/2
else:
  k = n//2
  for i in range(n):
    if(i%2==0):
      b[k+i]==a[i]
    else:
      b[k-i]==a[i]
print(b)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
  b.append(0)
k = 0
if(n%2==1):
  k = (n-1)/2
else:
  k = n//2
  for i in range(n):
    if(i%2==0):
      b[k+i]==a[i]
    else:
      b[k-i]==a[i]
Problem p03729 (python)

Fixed submission:
A,B,C= 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=map(int,input().split())
ans='NO'
A=[]
for i in range(10001):
    A.append((a*i-c)%b)
    if(i>3)and(A[0]==A[-1]):
      break
    if (a*i-c)%b==0:
        ans='YES'
        break
print(ans)
Problem p04047 (python)

Fixed submission:
N = int(input())
c=list(map(int, input().split()))
c.sort()
Max = 0
for i in range(len(c)):
    if i%2 == 0:
        Max = Max + c[i]
    else:
        None
print(Max)

Buggy submission (verdict: Runtime Error):
N = int(input())
c=list(map(int, input().split()))
c.sort()
Max = 0
for i in range(N):
  K = 2*N
  Max = Max + c[K]
print(Max)
Problem p02687 (python)

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

Buggy submission (verdict: Runtime Error):
S=input()
if (S==ABC):
  print("ARC")
else:
  print("ABC")
Problem p02817 (python)

Fixed submission:
S,T = input().split()
print (T+S)

Buggy submission (verdict: Runtime Error):
A,B,K = input().split()
x=0
while (int(A)>0):
  x=int(x)+1
  A=int(A)-1
  if(x>int(K)):
    break
while (int(B)>0):
  x=int(x)+1
  B=int(B)-1
  if(x>int(K)):
    break
if(A>0):
  A=int(A)+1
if(B>0):
  B=int(B)+1
print(format(A)+' '+format(B))

Buggy submission (verdict: Runtime Error):
A,B,K = input().split()
x=0
while (int(A)>0):
  x=int(x)+1
  A=int(A)-1
  if(x>int(K)):
    break
while (int(B)>0):
  x=int(x)+1
  B=int(B)-1
  if(x>int(K)):
    break
if(A>0):
  A=int(A)+1
if(B>0):
  B=int(B)+1
print(format(A)+' '+format(B))

Buggy submission (verdict: Runtime Error):
x=0
A,B,K = input().split()
while (int(A)>0):
  x=int(x)+1
  A=int(A)-1
  if(x>int(K)):
    break
while (int(B)>0):
  x=int(x)+1
  B=int(B)-1
  if(x>int(K)):
    break
if(A>0):
  A=int(A)+1
if(B>0):
  B=int(B)+1
print(format(A)+' '+format(B))
Problem p02993 (python)

Fixed submission:
S=input()
a=(str(S)[0])
b=(str(S)[1])
c=(str(S)[2])
d=(str(S)[3])
if(int(a)==int(b)):
  print("Bad")
elif(int(b)==int(c)):
  print("Bad")
elif(int(c)==int(d)):
  print("Bad")
else:
    print("Good")

Buggy submission (verdict: Runtime Error):
S=input()
a=(str(S)[0])
b=(str(S)[1])
c=(str(S)[2])
d=(str(S)[3])
if(int(a)==int(b)):
  print("Bad")
else:
    print("Good")
    if(int(b)==int(c)):
  print("Bad")
else:
    print("Good")
if(int(c)==int(d)):
  print("Bad")
else:
    print("Good")
Problem p03469 (python)

Fixed submission:
S = input()
print(S.replace('7', '8', 1))

Buggy submission (verdict: Runtime Error):
S = input()
print(S.replace(7, 8, 1))

Buggy submission (verdict: Runtime Error):
S = input()
S[3] = '8'
print(S)

Buggy submission (verdict: Runtime Error):
S = input()
print(S[3] = '8')
Problem p03067 (python)

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

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input())
if a<c and c<b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input())
if a<c<b:
  print("Yes")
else:
  print("No")
Problem p02553 (python)

Fixed submission:
import sys
#from collections import deque
#from functools import *
#from fractions import Fraction as f
from copy import *
from bisect import *	
#from heapq import *
#from math import ceil
#from itertools import permutations ,product
 
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
 
#sys.setrecursionlimit(10**6)
if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
di=[[-1,0],[1,0],[0,1],[0,-1]]
def inc(d,c,x=1):
	d[c]=d[c]+x if c in d else x
def bo(i):
	return ord(i)-ord('A')	
def li():
	return [int(xx) for xx in input().split()]
def fli():
	return [float(x) for x in input().split()]	
def comp(a,b):
	if(a>b):
		return 2
	return 2 if a==b else 0		
def gi():	
	return [xx for xx in input().split()]
def fi():
	return int(input())
def pro(a): 
	return reduce(lambda a,b:a*b,a)		
def swap(a,i,j): 
	a[i],a[j]=a[j],a[i]	
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())			
def gh():
	sys.stdout.flush()
def isvalid(i,j):
	return 0<=i<n and 0<=j<m and a[i][j]!="."
def bo(i):
	return ord(i)-ord('a')	
def graph(n,m):
	for i in range(m):
		x,y=mi()
		a[x].append(y)
		a[y].append(x)
def represent(n):
	s=""
	while n>0:
		s+=str(n%3)
		n//=3
	s=s[::-1]
	return s			

t=1
while t>0:
	t-=1
	a,b,c,d=mi()
	maxi=-10**19
	for i in a,b:
		for j in c,d:
			maxi=max(maxi,i*j)		
	print(maxi)

Buggy submission (verdict: Runtime Error):
import sys
#from collections import deque
#from functools import *
#from fractions import Fraction as f
from copy import *
from bisect import *	
#from heapq import *
#from math import ceil
#from itertools import permutations ,product
 
def eprint(*args):
    print(*args, file=sys.stderr)
zz=0
 
#sys.setrecursionlimit(10**6)
if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
di=[[-1,0],[1,0],[0,1],[0,-1]]
def inc(d,c,x=1):
	d[c]=d[c]+x if c in d else x
def bo(i):
	return ord(i)-ord('A')	
def li():
	return [int(xx) for xx in input().split()]
def fli():
	return [float(x) for x in input().split()]	
def comp(a,b):
	if(a>b):
		return 2
	return 2 if a==b else 0		
def gi():	
	return [xx for xx in input().split()]
def fi():
	return int(input())
def pro(a): 
	return reduce(lambda a,b:a*b,a)		
def swap(a,i,j): 
	a[i],a[j]=a[j],a[i]	
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())			
def gh():
	sys.stdout.flush()
def isvalid(i,j):
	return 0<=i<n and 0<=j<m and a[i][j]!="."
def bo(i):
	return ord(i)-ord('a')	
def graph(n,m):
	for i in range(m):
		x,y=mi()
		a[x].append(y)
		a[y].append(x)
def represent(n):
	s=""
	while n>0:
		s+=str(n%3)
		n//=3
	s=s[::-1]
	return s			

t=1
while t>0:
	t-=1
	a,b,c,d=mi()
	print(b*d)
Problem p02639 (python)

Fixed submission:
a=[int(x) for x in input().split()]
print(a.index(0)+1)

Buggy submission (verdict: Runtime Error):
from math import *
x,n=map(int,input().split())
a=[int(x) for x in input().split()]
s=[i for i in range(-100,105)]
s=set(s)-set(a)
s=list(s)
s.sort()
dif=10**18
#a.sort()
ans=s[0]
for i in range(len(s)):
	if abs(s[i]-x)<dif:
		dif=abs(s[i]-x)
		ans=s[i]
print(ans)