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

Fixed submission:
# -*- coding: utf-8 -*-
A,B,X= map(int,input().split())
if A + B >= X and X >= A:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c)))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c))
Problem p03378 (python)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c)))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c))

Buggy submission (verdict: Runtime Error):
N,M,X = map(int,input().split())
a = list(map(int(input().split())))
b = []
c = []
for i in range(0,X):
  if i in a:
    b.append(1)
for i in range(X+1,N):
  if i in a:
    c.append(1)
print(min(sum(b),sum(c)))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
array = [map(int,input().split())]
#検問所の入力
b=[]
c=[]
while X+1 <= i <= N: #X+1からNの範囲の整数について 
  if i in array: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in array: #ある整数が検問所の整数として存在する
    c.append(1)
print(sum(c))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = [int(i) for i in range(M)] #検問所の入力
b=[]
c=[]
for i in range(X:N): #XからNの範囲の整数について 
  if i in a is True: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1:X): #1からX-1の範囲の整数について
  if i in a is True: #ある整数が検問所の整数として存在する
    c.append(1)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = [int(i) for i in range(M)] #検問所の入力
b=[]
c=[]
for i in range(X:N): #XからNの範囲の整数について 
  if i in a is True: #ある整数が検問所の整数として存在する
    b.append(1)

for i in range(1:X): #1からX-1の範囲の整数について
  if i in a is True: #ある整数が検問所の整数として存在する
    c.append(1)
    
print(min(sum(b),sum(c))) #リストb,cの要素の和のうちいずれか小さいほうを出力
Problem p03380 (python)

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

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)

if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)

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

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)

def factorial(i):
    if i == 0:
        return 1
    else:
        return factorial(i-1)*i
ans = factorial(comb1)//((factorial(p))*(factorial(comb1-p)))
if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)
Problem p03423 (python)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
if N <= 2:
  print(0)
else:
  print(int(N // 3))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
if N > 3:
  print("{}".format(int(N // 3) + 1)
elif N <= 3:
        print(0)
Problem p03424 (python)

Fixed submission:
N = int(input())
S = list(map(str,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = list(map(int,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
a = []
for i in range(1,N+1):
  a.append(input())
if a.count("Y") == 0:
  print("Three")
else:
  print("Four")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
a = []
for i in range(1,N+1):
  a.append(input())
  
if a.count("Y") == 0:
  print("Three")
else:
  print("Four")

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [input() for i in range(1:N)]
if a.count("Y") == 0:
  print("Three")
else:
  print("Four")
Problem p03456 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())#文字の入力
import math
S = math.sqrt(int(a+b))
if S == int(S):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())#文字の入力
import math
S = math.sqrt(int("a"+"b")
if S == int(S):
  print("Yes")
else:
  print("No")
Problem p03470 (python)

Fixed submission:
N = int(input())
a = [int(input()) for i in range(N)]
li_uniq = list(set(a))
print(len(li_uniq))

Buggy submission (verdict: Runtime Error):
N = int,input()
a = [int(input()) for i in range(N)]
li_uniq = list(set(a))
print(len(li_uniq))
Problem p03474 (python)

Fixed submission:
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
    S = S[:A]+S[A+1:A+B+1]
    if S.isdigit() is True:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
  T = pop(S[A])
  if T.isdigit() is True:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B = map(int,input().split())
S = str(input())
if S[A] == "-":
  T = del S[A]
  if T.isdigit() is True:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Problem p03477 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A, B, C, D =map(int,input().split())
if (A+B) > (C+D):
  print("Left")
elif (A+B) == (C+D):
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A, B, C, D =map(int,input().split())
if (A+B) > (C+D):
  print(Left)
elif (A+B) == (C+D):
  print(Balanced)
else:
  print(Right)
Problem p03493 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a,b,c=map(str,input())
S = a+b+c
print(S.count("1"))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b,c-map(str,input())
S = abc
print(S.count("1"))
Problem p03494 (python)

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

P = []

for i in A:
    ans = 0
    while int(i) == i:
        i = i/2
        ans += 1
    P.append(ans)

print(min(P)-1)

Buggy submission (verdict: Runtime Error):
def how_many_times_divisible(n):
	ans = 0
	while n % 2 == 0:
		n /= 2
		ans += 1
	return ans
n = int(input())
a = map(int,input().split())
ans = min(map(how_many_times_divisible, a))
print ans

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
array = [map(int,input().split())]
n = 0
for i in range(N+1):
  if array[i] % 2 == 0:
    continue    
  else:
    break
n = n+1
continue
print(n)
Problem p03501 (python)

Fixed submission:
# -*- coding: utf-8 -*-
N,A,B = map(int,input().split())
if A * N >= B:
  print(B)
else:
  print("{}".format(A*N))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,A,B =map(int,input(),split())
if (A * N) > B:
  print(B)
else:
  print(A*N)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,A,B =map(int,input(),split())
if (A * N) > B:
  print(B)
else:
  print(A*N)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,A,B =map(int,input(),split())
if (A * N) > B:
  print(B)
else:
  print(A*T)
Problem p03502 (python)

Fixed submission:
# -*- coding: utf-8 -*-
N = str(input())
a=[]
for i in range(len(N)):
  S = int(N[i])
  a.append(S)
T = sum(a)
if int(N) % T == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = str(input())
a=[]
for i in range(N):
  S = int(N[i])
  a.append(S)
T = sum(a)
if int(N) % T == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = str(input())
a=[]
for i in range(N):
  S = int(N[i])
  a.append(S)
T = sum(S)
if int(N) % T == 0:
  print("Yes")
else:
  print("No")
Problem p03543 (python)

Fixed submission:
#-*- coding: utf-8 -*-
N = str(input())
if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
#-*- coding: utf-8 -*-
N = str(input())
  if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
#-*- coding: utf-8 -*-
N = str(input())
for i in range(1,2):
  if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]
Problem p03547 (python)

Fixed submission:
X,Y = map(str,input().split())
S = [X,Y]
map(hex,S)
P = S[0]
Q = S[1]
if P>Q:
  print(">")
elif P==Q:
  print("=")
else:
  print("<")

Buggy submission (verdict: Runtime Error):
X,Y = map(int,input().split())
S = [X,Y]
map(hex,S)
P = S[0]
Q = S[1]
if P>Q:
  print(">")
elif P==Q:
  print("=")
else:
  print("<")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X,Y = map(int,input().split())
S = [X,Y]
map(hex,S)
P = S[0]
Q = S[1]
if P>Q:
  print(>)
elif P=Q:
  print(=)
else:
  print(<)
Problem p03548 (python)

Fixed submission:
# -*- coding: utf-8 -*-
X,Y,Z = map(int,input().split())
a = []
X = X-Z
while X >= Z+Y:
  a.append(1)
  X = X - (Z+Y)
print(sum(a))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X,Y,Z = map(int,input().split())
a = []
while X >= Z+Y:
  a.append(1)
else:
  break
print(sum(a))
Problem p03555 (python)

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
T = str(input())
if T[::-1] == S:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
T = str(input())
if T[::-1] = S:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = str(input())
M = str(input())
if N = M.reverse():
  print(YES)
else:
  print(NO)
Problem p03573 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C =map(int,input().split())
if A == B:
  print(C)
elif B == C:
  print(A)
else:
  print(B)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C =map(int,input().split())
if A == B:
  print(C)
elif B == C:
  print(A)
else:
  print()B
Problem p03609 (python)

Fixed submission:
# -*- coding: utf-8 -*-
X , t= map(int, input().split())
if X > t:
  print(X - t)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X = int(input())
t = int(input())
if X > t:
  print(X - t)
else:
  print(0)
Problem p03610 (python)

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
a=[]
for i in range(len(S)):
  if i % 2 == 0:
    a.append(S[i])
print("".join(a))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
a.[]
for i in range(len(S)):
  if i % 2 == 1:
    a.append(S[i])
print(a.join())

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = str(input())
for i in range(len(S) / 2):
  s.pop(2*i - 1)
print(s)
Problem p03624 (python)

Fixed submission:
S = input()

unko =["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"]

for i in unko:
    if S.count(i) == 0:
        print(i)
        exit()

print("None")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
L = ["abcdefghijklmnopqrstuvwxyz"]
T = L-S
print(T[0])
Problem p03625 (python)

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

AS = list(set(A))
D = {}
for i in A:
    if i in D.keys():
        D[i] += 1
    else:
        D[i] = 1

accum = []
AS.sort(reverse=True)
for i in AS:
    if D[i] >= 2:
       accum.append(i)

if len(accum) != 0:
   if D[accum[0]] >= 4:
    print(accum[0]**2)
   elif D[accum[0]] >= 2:
    print(accum[0]*accum[1])
else:
    print(0)

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

AS = list(set(A))
D = {}
for i in A:
    if i in D.keys():
        D[i] += 1
    else:
        D[i] = 1

accum = []
AS.sort(reverse=True)
for i in AS:
    if D[i] >= 2:
       accum.append(i)


if D[accum[0]] >= 4:
    print(accum[0]**2)
elif D[accum[0]] >= 2:
    print(accum[0]*accum[1])
else:
    print(0)
Problem p03632 (python)

Fixed submission:
A,B,C,D = map(int,input().split())

sup = max(D,B)
inf = min(A,C)

if B-A + D-C <= sup - inf:
    print(0)
else:
    print(B-A+D-C - (sup - inf))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C,D = map(int,input().split())
L = [A:B]
M = [C:D]
print(L&M)
Problem p03636 (python)

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
T,U = S[0],S[-1]
print(S[0]+str(len(S[1:len(S)-1]))+S[-1])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
T,U = S[0],S[-1]
print(S[0]+len(S[1:-2])+S[-1])
Problem p03658 (python)

Fixed submission:
N , K = map(int,input().split())
l = list(map(int,input().split()))
asc_lst = sorted(l)
ans = []
for i in range(K):
    ans.append(asc_lst[-(i+1)])

A = sum(ans)
print(A)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
l = [map(int,input().split())]
m = sorted(l).reverse()
b = []
for i in range(K):
  b.append(m[i])
print(sum(b))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,K = map(int,input().split())
a = [int(i) for i in range(N)]
L = sorted(a)
M = a.reverse()
b = []
for j in range(K):
  b.append(L(j))
print(sum(b))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,K = map(int,input().split())
a = [int(i) for i in range(N)]
L = sorted(a)
L = L[::-1]
for i in range(N):
  b.append(a[i])
print(sum(b))
Problem p03679 (python)

Fixed submission:
# -*- coding: utf-8 -*-
X,A,B = map(int,input().split())
if B - A > X:
  print("dangerous")
elif B - A <= X and B - A > 0:
  print("safe")
else:
  print("delicious")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
X,A,B = map(int,input().split())
if B - A > X:
  print(dangerous)
elif B - A <= X and B - A > 0:
  print(safe)
else:
  print(delicious)
Problem p03693 (python)

Fixed submission:
# -*- coding: utf-8 -*-
r,g,b =map(str, input().split())
S = r+g+b
T = int(S)
if T % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
r,g,b = int(input())
S = "r"+"g"+"b"
T = int(input(S))
if T % 4 == 0:
  print("YES")
else:
  print("NO")
Problem p03694 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split())) 
A = set(a)
B = sorted(A)
C = []
for i in range(len(A)-1):
    C.append(B[i+1]-B[i])
print(sum(C))

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    a = list(map(int,input().split())) 
A = set(a)
B = sorted(A)
C = []
for i in range(len(A)):
    C.append(B[i+1]-B[i])
print(sum(C))

Buggy submission (verdict: Runtime Error):
N = int(input())
a = map(int,input().split())
L = []
M = []
for i in range(N):
  L.append(a[i])
L.sort()
for i in range(N):
  M.append(L[i+1]-L[i])
print(sum(M))
Problem p03697 (python)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A , B =map(int,input().split())
if A + B <10:
  print("{}".format(A+B))
else:
  print("error")

Buggy submission (verdict: Runtime Error):
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		if (a+b >= 10){
			System.out.println("error");
	    }
	    else {
			System.out.println(a+b);
		}
	}
}

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A,B=map(int,input(),split())
if A + B <10:
  print("{}".format(A+B))
else:
  print("error")
Problem p03711 (python)

Fixed submission:
# -*- coding: utf-8 -*-
x,y = map(int,input().split())
A = {1,3,5,7,8,10,12}
B = {4,6,9,11}
C = {2}
S = {x,y}
if (S <= A or S <= B) is True:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding; utf-8 -*-
H,W = map(int,input().split())
a = []
for i in range(H):
  a.append(map(str,input().split()))
print("#####")
while i < H:
  print("#"+str(a[i])+"#")
  i=i+1
print("#####")
Problem p03720 (python)

Fixed submission:
N,M = map(int,input().split())
A = [(list(map(int,input().split()))) for i in range(M)]
L = []
for i in range(M):
    L.append(A[i][0])
    L.append(A[i][1])
for i in range(1,N+1):
    print(L.count(i))

Buggy submission (verdict: Runtime Error):
8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,M = map(int,input().split())
a,b = map(list,input() for i in range(M))
for i in range(N):
  print(a.count(i) + b.count(i))
Problem p03737 (python)

Fixed submission:
# -*- coding: utf-8 -*-
s,t,u = map(str,input().split())
S = s[0]
T = t[0]
U = u[0]
print("{}".format((S+T+U).upper()))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s,t,u = map(str,input().split())
S = s[0]
T = t[0]
U = u[0]
print("{}".format(S+T+U.upper())

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s,t,u=map(str,input().split)
A = s[0]
B = t[0]
C = u[0]
print("{}".format(A+B+C.upper()))
Problem p03738 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
S = A-B
if S > 0:
  print("GREATER")
elif S == 0:
  print("EQUAL")
else:
  print("LESS")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
S = A-B
if S > 0:
  print("GREATER")
elif S = 0:
  print("EQUAL")
else:
  print("LESS")
Problem p03759 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a,b,c = map(int,input().split())
if b-a == c-b:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b,c = map(int,input().split())
if b-a = c-b:
  print("YES")
else:
  print("NO")
Problem p03760 (python)

Fixed submission:
# -*- coding: utf-8 -*-
O = str(input())
E = str(input())
a = []
if len(O) == len(E):
  for i in range(len(O)):
    a.append(O[i]+E[i])
else:
  for i in range(len(O)-1):
    a.append(O[i]+E[i])
  a.append(O[-1])
L = "".join(a)
print(L)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
O = str(input())
E = str(input())
a = []
if len(O) == len(E):
  for i in range(len(O)):
    a.append(O[i]+E[i])
else:
  for i in range(len(O)):
    a.append(O[i]+E[i])
  a.append(O[-1])
L = "".join(a)
print(L)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
O = str(input())
E = str(input())
a = []
if len(O) == len(E):
  for i in range(len(O)):
    a.append(O[i]+E[i])
else:
  for i in range(len(O)):
    a.append(O[i]+E[i])
  a.append(O[-1])
L = "".join(a)
print(L)
Problem p03777 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a == "H" and b == "H")or(a =="D" and b == "D"):
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a = "H" and b = "H")or(a = "D" and b = "D"):
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H1)
D = int(D1)
A = int(a)
B = int(b)
if B * A == 1:
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H1)
D = int(D1)
A = int(a)
B = int(b)
if a * b == 1:
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H1)
D = int(D1)
if a * b == 1:
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H)
D = int(D)
if H * D == 1:
  print("H")
else:
  print("D")
Problem p03796 (python)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
A = 1
for i in range(N):
  A = A*(i+1) % (10 ** 9 + 7)
print(A)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
def fact(n):
  if n == 0:
    return 1
  elif n == 1:
    return 1
  else:
    return fact(n-1)*n
print(fact(N) % (10**9 +7))
Problem p03826 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C,D = map(int,input().split())
print("{}".format(max(A*B,C*D)))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
S = str(input())
a = []
for i in range(N):
  b = S[0:i+1].count("I")
  c = S[0:i+1].count("D")
  M = b-c
  a.append(M)
print(max(a))
Problem p03827 (python)

Fixed submission:
N = int(input())
S = str(input())
lst_for_ans = []
for i in range(len(S)+1):
       I_count = S[:i].count("I")
       D_count = S[:i].count("D")
       lst_for_ans.append(I_count - D_count)

print(max(max(lst_for_ans),0))

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(input())
lst_for_ans = []
for i in range(len(S)):
       I_count = S[:i].count("I")
       D_count = S[:i].count("D")
       lst_for_ans.append(I_count - D_count)

       print(max(lst_for_ans,0))
Problem p03844 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A,op,B = map(str,input().split())
S,T=int(A),int(B)
if op == "+":
  print(S+T)
else:
  print(S-T)

Buggy submission (verdict: Runtime Error):
import java.util.*;
public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        String op = sc.next();
        int B = sc.nextInt();

        if (op.equals("+")){
            System.out.println(A+B);
        }
        else{
            System.out.println(A-B);
        }
        sc.close();
    }
}
Problem p03852 (python)

Fixed submission:
# -*- coding: utf-8 -*-
c = str(input())
if c == "a" or c == "i" or c == "u" or c == "e" or c == "o":
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
c = str(input())
if c == "a" or c == "i" or c == "u" or c == "e" or c == "o"
Problem p03861 (python)

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

def func(i):
    if i != -1:
        return i//x+ 1
    else:
        return 0

print(func(b) - func(a-1))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b,x = map(int,input().split())
a = []
for i in range(a:b+1):
  if i % x == 0:
    a.append(1)
print(sum(a))
Problem p04033 (python)

Fixed submission:
a,b = map(str,input().split())#整数を文字列として入力
S = a+b
P = S.count("-")
if P == 1:
  print("Zero")
elif P == 2:
  if (int(b) - int(a)) % 2 ==0:
    print("Negative")
  else:
    print("Positive")
else:
  print("Positive")

Buggy submission (verdict: Runtime Error):
a,b = str(int,input().split())#整数を文字列として入力
S = a+b
P = S.count("-")
if P == 1:
  print("0")
elif P == 2:
  print("Negative")
else:
  print("Positive")
Problem p04043 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C = map(str,input().split())
S = A+B+C
if S.count("5") ==2 and S.count("7") == 1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
S =set("ABC")
T =set("557")
if S & T = ("5","5","7"):
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
S =[A,B,C]
T =[5,5,7]
if S = T:
  print("YES")
else:
  print("NO")