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

Fixed submission:
s = {"a":input(), "b":input(), "c":input()}
x = "a"
while len(s[x])!=0:
    i = s[x][0]
    s[x]=s[x][1:]
    x = i
print(x.upper())
#コピペです。

Buggy submission (verdict: Runtime Error):
s = {"a":input(), "b":input(), "c":input()}
x = "a"
while len(s[x])!=0:
    i = s[x].pop[0]
    x = i
print(x.upper())
Problem p04011 (python)

Fixed submission:
N=int(input())
K=int(input())
X=int(input())
Y=int(input())
if N>=K:
    print(K*X+(N-K)*Y)
if N<K:
    print(N*X)

Buggy submission (verdict: Runtime Error):
N=input()
K=input()
X=input()
Y=input()
S=K*X+(N-K)*Y
print(S)
Problem p04015 (python)

Fixed submission:
n,a=map(int, input().split())
x=list(map(int, input().split()))
x=[i-a for i in x]
d={0:1}
for i in x:
    for j,k in list(d.items()):
        d[i+j]=d.get(i+j,0)+k
print(d[0]-1)
#sample code.

Buggy submission (verdict: Runtime Error):
n,a=map(int, input().split())
x=list(map(int, input().split()))
x=[i-a for i in x]
d={0:1}
for i in x:
    for j,k in list(d.items()):
        d[i+.j]=d.get(i+j,0)+k
print(d[0]-1)
#sample code
Problem p04019 (python)

Fixed submission:
S = input()
if ('N' in S) ^ ('S' in S) or ('W' in S) ^ ('E' in S):
    print('No')
else:
    print('Yes')
#コピペです。

Buggy submission (verdict: Runtime Error):
s=list(input())
s_s=set(s)
l={"W","N","E","S"}
if s_s==l:
    print("Yes")
else: 
    print(("No")

Buggy submission (verdict: Runtime Error):
s=list(input())
if l.count("N")==l.count("S") and l.count("E")==l.count("W"):
    print("Yes")
else:
    print("No")
Problem p04029 (python)

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

Buggy submission (verdict: Runtime Error):
N=input()
i=1
while i<N:
    s+=i
    i+=1
    print(s)

Buggy submission (verdict: Runtime Error):
N=input()
S=N(N+1)//2
print(S)
Problem p04030 (python)

Fixed submission:
s=list(input())
l=[]
for i in s:
    if i=="1":
        l.append(i)
    elif i=="0":
        l.append(i)
    elif i=="B":
        if len(l)!=0:
            l.pop()
print("".join(l))

Buggy submission (verdict: Runtime Error):
s=list(input())
l=[]
for i in s:
  if i=="B":
    if len(l)!=0:
      l.rstrip()
  elif i=="0":
    l.append(i)
  elif i=="1":
    l.append(i)
print("".join(l))

Buggy submission (verdict: Runtime Error):
s=input()
l=""
for i in s:
  if i=="B":
    if len(l)!=0:
      l.rstrip()
  elif i=="0":
    l.append(i)
  elif i=="1":
    l.append(i)
print(l)
Problem p04043 (python)

Fixed submission:
print(["NO","YES"][eval(input().replace(" ","*"))==175])

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
s=[input() for i in range(n)]
S="".join(sorted(s))
print(S)

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

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

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

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

Buggy submission (verdict: Runtime Error):
N,L=map(int,input().split())
s=[input() for i in range(N)]
s=sorted(s)
print("".join(s))

Buggy submission (verdict: Runtime Error):
print(["NO","YES"][eval(input().replace(" ","*"))])
Problem p04044 (python)

Fixed submission:
N,L=map(int,input().split())
s=[input() for i in range(N)]
s=sorted(s)
s="".join(s)
print(s)

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

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[input() for i in n]
print(s.sort())

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[input() for i in range(N)]
s=sorted(s)
s="".join(s)
print(s)
Problem p04047 (python)

Fixed submission:
input()
print(sum(sorted(map(int,input().split()))[::2]))

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[input() for i in range(n)]
l.sort()
s=0
for j in l[::2]:
    s+=j
print(s)
Problem p03059 (python)

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

ans = T//A * B
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, t = map(float(input().split()))
answer = int((t + 0.5) / a) * b
print(answer)

Buggy submission (verdict: Runtime Error):
a, b, t = (float(i) for i in input().split())
print(int(t + 0.5) / a) * b)

Buggy submission (verdict: Runtime Error):
import math
a, b, t = (float(i) for i in input().split())
print(int(math.fllor((t + 0.5) / b)) * a)
Problem p03071 (python)

Fixed submission:
a = [int(e) for e in input().split()]

if(a[0]<=a[1]):
    tmp=a[1]
    a[1]=a[1]-1
else:
    tmp=a[0]
    a[0]=a[0]-1

if(a[0]<=a[1]):
    tmp1=a[1]
    a[1]=a[1]-1
else:
    tmp1=a[0]
    a[0]=a[0]-1

print(tmp+tmp1)

Buggy submission (verdict: Runtime Error):
a = int (input())
b = [int(a) for a in input().split()]
count=1
count1=0
le = len(b)-1

for i in range(le):
    if(b[i]<=b[i+1] and b[0]<=b[i+1] ):
        count=count+1
print(count)
Problem p03086 (python)

Fixed submission:

arg=input()
x=len(arg)
count=0
d=[0]

for i in arg:
    if(i=="A" or i=="C" or i=="G" or i=="T"):
        count=count+1
        d.append(count)
    else:
        count=0

print(max(d))

Buggy submission (verdict: Runtime Error):

arg=input()
x=len(arg)
count=0
d=[]

for i in arg:
    if(i=="A" or i=="C" or i=="G" or i=="T"):
        count=count+1
        d.append(count)
    else:
        count=0

print(max(d))
Problem p03071 (python)

Fixed submission:
a,b = (int(_) for _ in input().split())
ans = 0
for i in range(2):
    c = max(a,b)
    ans += c
    if c == a:
        a = a - 1
    else:
        b = b - 1
print(ans)

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

ans = 1 
for i in range(1,N):
    if H[i] >= max(H[:i]):
        ans += 1
print(ans)
Problem p03206 (python)

Fixed submission:
day = int(input())
if day == 22:
    print("Christmas Eve Eve Eve")
if day == 23:
    
    print("Christmas Eve Eve")

if day == 24:
    
    print("Christmas Eve")

if day == 25:
    
    print("Christmas")

Buggy submission (verdict: Runtime Error):
day = int(input())
if day == 22:
  print('Christmas Eve Eve Eve')
else if day == 23:
   print('Christmas Eve Eve')
else if day == 24:
   print('Christmas Eve')
else:
  print( print('Christmas)
Problem p03238 (python)

Fixed submission:
age = int(input())

if age == 1 :
    print('Hello World')
elif age ==2:
    A=int(input())
    B=int(input())
    print(A+B)

Buggy submission (verdict: Runtime Error):
age = int(input())
if age == 1:
  print('Hello world")
elif age == 2:
  A = input()
  B = input()
  print(A+B)
Problem p03076 (python)

Fixed submission:
menu = [int(input()) for i in range(5)]
adjust = []
total = 0

for i in menu:
    if i%10 == 0:
        total += i
    else:
        adjust.append(i%10)
        total += (i + 10-(i%10))

adjust.sort()
if len(adjust) > 0:
    total -= 10-adjust[0]

print(total)

Buggy submission (verdict: Runtime Error):
menu = [int(input()) for i in range(5)]
adjust = []
total = 0

for i in menu:
    if i%10 == 0:
        total += i
    else:
        adjust.append(i%10)
        total += (i + 10-(i%10))

adjust.sort()
total -= 10-adjust[0]
print(total)

Buggy submission (verdict: Runtime Error):
menu = [int(input()) for i in range(5)]
adjust = []
total = 0

for i in menu:
    if i%10 == 0:
        total += i
    else:
        adjust.append(i%10)
        total += (i + 10-(i%10))

adjust.sort()
total -= 10-adjust[0]
print(total)
Problem p03281 (python)

Fixed submission:
n = int(input())
answer = 0
for i in range(1, n+1, 2):
    num_of_divisor = 0
    for j in range(1, i+1):
        if i % j == 0:
            num_of_divisor += 1
    if num_of_divisor == 8:
        answer += 1
print(answer)

Buggy submission (verdict: Runtime Error):
answer = 0
for i in range(1, n+1, 2):
    num_of_divisor = 0
    for j in range(1, i+1):
        if i % j == 0:
            num_of_divisor += 1
    if num_of_divisor == 8:
        answer += 1
print(answer)
Problem p03125 (python)

Fixed submission:
a,b = map(int,input().split())
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if b % a = 0:
  print(a+b)
else:
  print(b-a)
Problem p03219 (python)

Fixed submission:
a = list(map(int,input().split()))
print(a[0] + int(a[1]/2))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = list(map(int,input().split()))
c = list(map(int,input().split()))
x = []

for i in range(a):
  l = abs(b[0] - c[i]*0.006 - b[1])
  x.append(l)
  
print(x.index(min(x)) + 1)

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

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

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

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
if a[0] == 1:
	print("Hello World")
else:
	print(a[1] + a[2])

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
if a[0] == 1:
	print("Hello World")
else:
	print(a[1]+a[2])

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
if a[0] == 2:
	print("Hello World")
	else:
		print(a[1]+a[2])

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
if a[0] == 2:
	print("Hello World")
else:
	print(a[1]+a[2])

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
if a[0] == 2:
  print("Hello World")
else:
  print(a[1]+a[2])

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
if a[0] == 2:
  print("Hello World")
elif:
  print(a[1]+a[2])

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
if a[0] == 2:
  print("Hello World")
elif print(a[1]+a[2])

Buggy submission (verdict: Runtime Error):
a = int(input())
if a == 1:
  print("Hello Wor\ld")
elif:
  b = int(input())
  c = int(input())
  print(b + c)
Problem p03260 (python)

Fixed submission:
a,b = map(int,input().split())
c = 9
if c % (a * b) == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(2)]
if (a[0] * a[1]) % 2 == 0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a,b = [int(input()) for i in range(2)]
if (a * b) % 2 == 0:
  print("No")
else:
  print("Yes")
Problem p03284 (python)

Fixed submission:
a,b = map(int,input().split())
if a%b == 0:
  print(0)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
a = map(int,input().split())
if a%b == 0:
  print(0)
else:
  print(1)
Problem p03292 (python)

Fixed submission:
a = list(map(int,input().split()))
print(max(a) - min (a))

Buggy submission (verdict: Runtime Error):
a = map(int,input().split())
print(max(a)-min(a))

Buggy submission (verdict: Runtime Error):
a = map(int,input().split())
a.sort()
print(a[2]-a[0])
Problem p03323 (python)

Fixed submission:
a = list(map(int,input().split()))
if a[0] <=8 and a[1] <=8:
  print("Yay!")
else:
  print(":(")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
if a[0] <=8 and a[1] <=8:
  print("Yay!")
else:
  print(:()

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a >9:
  print(":(")
elif b > 9:
  print(":(")
else:
  print(""Yay!)

Buggy submission (verdict: Runtime Error):
a = map(int,input().split())
if a[0] >9:
  print(":(")
elif a[1] >9:
  print(":(")
else:
  print(""Yay!)
Problem p03351 (python)

Fixed submission:
a = list(map(int,input().split()))
if abs(a[2] - a[0]) <= a[3]:
  print("Yes")
elif abs(a[0] - a[1]) <= a[3] and abs(a[1] - a[2]) <= a[3]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = list(map(input().split()))
if abs(a[2]- a[0]) <= a[3]:
  print("Yes")
elif abs(a[0] - a[1]) <= a[3] and abs(a[1] - a[2]) <= a[3]:
  print("Yes")
else:
  print("No")
Problem p03455 (python)

Fixed submission:
a = list(map(int,input().split()))
if (a[0] * a[1]) % 2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
if (a * b) % 2 == 0:
  print("Even")
else:
  print("Odd")
Problem p03477 (python)

Fixed submission:
a = list(map(int,input().split()))
l = a[0] + a[1]
r = a[2] + a[3]
if l > r:
  print("Left")
elif l == r:
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
l = a[0] + a[1]
r = a[2] + a[3]
if l > r:
  print("Left")
elif l = r:
  print("Balanced")
else:
  print("Right")
Problem p03502 (python)

Fixed submission:
a = input()
b = list(map(int,list(a)))

if int(a) % sum(b) == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = list(map(int,list(a)))

if a % sum(b) == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = list(map(int,list(a)))

if a / sum(b) == 0:
  print("Yes")
else:
  print("No")
Problem p03543 (python)

Fixed submission:
a = list(input())
if a[0] == a[1] and a[1] == a[2]:
  print("Yes")
elif a[1] == a[2] and a[2] == a[3]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = list(input())
if a[0] == a[1] and a[1] == a[2]:
  print(Yes)
elif a[1] == a[2] and a[2] == a[3]:
  print(Yes)
else:
  print("No")
Problem p03606 (python)

Fixed submission:
a = int(input())
b = [input().split() for i in range(a)]
c = 0

for i in range(a):
  c = c + int(b[i][1]) - int(b[i][0]) + 1
print(c)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = [input().split() for i in range(a)]
c = 0

for i in range(a):
  c += b[i][1]-b[i][0]+1
print(c)
Problem p03693 (python)

Fixed submission:
a = list(map(int,input().split()))
b = a[0]*100 + a[1] *10 + a[2]
if b % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = "".join(a)
if b % 4 == 0:
  print("YES")
else:
  print("NO")
Problem p03737 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()
print(a[0].upper()+b[0].upeer() +c[0].upper())
Problem p03760 (python)

Fixed submission:
a = list(input())
b = list(input())
c = []
flag = False

if len(a) != len(b):
  flag = True
  b.append("X")

for i in range(len(a)):
    c += a[i] + b[i]

if flag == True:
  c.pop()
  print("".join(c))
else:
  print("".join(c))

Buggy submission (verdict: Runtime Error):
a = list(input())
b = list(input())
c = []

if len(a) != len(b):
  flag = True
  b.append("X")

for i in range(len(a)):
    c += a[i] + b[i]

if flag == True:
  c.pop()
  print("".join(c))
else:
  print("".join(c))
Problem p03844 (python)

Fixed submission:
a = input().split()
if a[1] == "+":
  print(int(a[0]) + int(a[2]))
else:
  print(int(a[0]) - int(a[2]))

Buggy submission (verdict: Runtime Error):
a = list(input().split())
if a[1] = "+":
  print(int(a[0]) + int(a[2]))
else:
  print(int(a[0]) - int(a[2]))
Problem p03962 (python)

Fixed submission:
a = list(map(int,input().split()))
if a[0] == a[1] and a[1] == a[2]:
  print(1)
elif a[0] != a[1] and a[1] != a[2] and a[2] != a[0]:
  print(3)
else:
  print(2)

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
a.sort()
if a != b and b != c:
  print(3)
elif a == b and b == c:
  print(1)
else:
  print(2)
Problem p04011 (python)

Fixed submission:
a = [int(input()) for i in range(4)]
if a[0] <= a[1]:
  print(a[0]*a[2])
else:
  print(a[1]*a[2] + (a[0]-a[1])*a[3])

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

if a > b:
  print(b*c+(a-b)*d)
else:
  print(a*c)
Problem p04012 (python)

Fixed submission:
a = list(input())
b = list(set(a))

for i in range(len(b)):
  if a.count(b[i]) % 2 != 0:
    print("No")
    break
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a = list(input())
b = list(set(a))

for i in range(b):
  if a.count(b[i]) % 2 != 0:
    print("No")
    break
else:
  print("Yes")
Problem p04030 (python)

Fixed submission:
a = list(input())
b = []

for i in range(len(a)):
  if a[i] == "0":
    b.append("0")
  elif a[i] == "1":
    b.append("1")
  elif a[i] == "B":
    if b == []:
      b = []
    else:
      del b[-1]
    
print("".join(b))

Buggy submission (verdict: Runtime Error):
moji = list(input())
ans = []

for i in moji:
  if i == "0":
    ans.append("0")
  elif i == "1":
    ans.append("1")
  else:
    ans.pop()
    
print("".join(ans))
Problem p04043 (python)

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

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

Buggy submission (verdict: Runtime Error):
a = map(int,input().split())
a.sort()
if a[0] == 5:
  if a[1] == 7:
    if a[2] == 5:
      print("YES")
print("NO")
Problem p03651 (python)

Fixed submission:
import fractions

N, K = map(int, input().split())
As = list(map(int, input().split()))

def solve(N, K, As):
    if N == 1:
        if K == As[0]:
            print("POSSIBLE")
        else:
            print("IMPOSSIBLE")
        return
    g = As[-1]
    for a in As[:-1]:
        g = fractions.gcd(g, a)
    maxA = max(As)
    if (maxA >= K) and ((maxA - K)%g) == 0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")

solve(N, K, As)

Buggy submission (verdict: Runtime Error):
import math

N, K = map(int, input().split())
As = list(map(int, input().split()))

def solve(N, K, As):
    if N == 1:
        if K == As[0]:
            print("POSSIBLE")
        else:
            print("IMPOSSIBLE")
        return
    g = As[-1]
    for a in As[:-1]:
        g = math.gcd(g, a)
    maxA = max(As)
    if (maxA >= K) and ((maxA - K)%g) == 0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")

solve(N, K, As)
Problem p03720 (python)

Fixed submission:
N, M = map(int, input().split())
Es = [[] for _ in range(N)]
for n in range(M):
    a, b = map(int, input().split())
    Es[a - 1].append(b - 1)
    Es[b - 1].append(a - 1)

for e in Es:
    print(len(e))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
Es = [[] for _ in range(N)]
for n in range(N):
    a, b = map(int, input().split())
    Es[a - 1].append(b - 1)
    Es[b - 1].append(a - 1)

for e in Es:
    print(len(e))
Problem p03109 (python)

Fixed submission:
S = input()
a = int(S[5:7])
if a >4:
    print("TBD")
else:
    print("Heisei")

Buggy submission (verdict: Runtime Error):
S= input()
m= int(S[5:7])
if S>4:
  print('TBD')
else:
  print('Heisei')

Buggy submission (verdict: Runtime Error):
y, m, d =list(map(int, input().split('/')))
if y<2019:
  print('Heisei')
elif m=<4:
  print('Heisei')
else:
  print('TBD')
Problem p03210 (python)

Fixed submission:
age= int(input())
if age== 7:
  print('YES')
elif age== 5:
  print('YES')
elif age== 3:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
age= int(input())
if age=7 or 5 or 3:
  print('YES')
else:
  print('NO')
Problem p03219 (python)

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

Buggy submission (verdict: Runtime Error):
a,b= map(int, input())
print(a+(b//2))
Problem p03076 (python)

Fixed submission:
L = [int(input()) for i in range(5)]
l = [i*(-1)//10*10*(-1) for i in L]
l1 = [i%10 for i in L]
l2 = sorted(list(set(l1)))
if l2[0] == 0:
  if len(l2) == 1:
    print(sum(L))
  else:
    print(sum(l)-l[l1.index(l2[1])]+L[l1.index(l2[1])])
else:
  print(sum(l)-l[l1.index(l2[0])]+L[l1.index(l2[0])])

Buggy submission (verdict: Runtime Error):
L = [int(input()) for i in range(5)]
l = [i*(-1)//10*10*(-1) for i in L]
l1 = [i%10 for i in L]
l2 = sorted(list(set(l1)))
if l2[0] == 0:
  print(sum(l)-l[l1.index(l2[1])]+L[l1.index(l2[1])])
else:
  print(sum(l)-l[l1.index(l2[0])]+L[l1.index(l2[0])])
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a*b%2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a*b%2 == 0:
  print(Even)
else:
  print(Odd)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a*b%2 == 0:
  print(Even)
 else:
  print(Odd)
Problem p03060 (python)

Fixed submission:
import numpy as np 
n = int(input())
if n  < 2:
    print(0)
    exit()
e = [[int(i) for i in input().split()] for i in range(2)]
e3 = np.array(e)
a = np.sort((e3[0] - e3[1]))
print(a[a>0].sum())

Buggy submission (verdict: Runtime Error):
import numpy as np 
n = int(input())
e = [[int(i) for i in input().split()] for i in range(2)] 
e3 = np.array(e)
print(np.sort((e3[0] - e3[1]))[::-1][0] + np.sort((e3[0] - e3[1]))[::-1][1])
Problem p03101 (python)

Fixed submission:
a, b= (int(i) for i in input().split()) 
c, d = (int(i) for i in input().split()) 
print(((a-c)*(b-d)))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

N, M = (int(i) for i in input().split()) 
AB=[list(map(int,input().split())) for _ in range(N)]
# print(AB)
AB.sort()
# print(AB)

money = 0
for a, b in AB:

    # print(M) 
    if M==0:
        break
    elif b < M:
        # print(a*xb)
        money += a*b
        M -= b
    elif b >= M:
        # print(M)
        money += M*a
        M = 0
    # print(M, money)
print(money)
Problem p03103 (python)

Fixed submission:
# coding: utf-8
# Your code here!

N, M = (int(i) for i in input().split()) 
AB=[list(map(int,input().split())) for _ in range(N)]
# print(AB)
AB.sort()
# print(AB)

money = 0
for a, b in AB:

    # print(M) 
    if M==0:
        break
    elif b < M:
        # print(a*xb)
        money += a*b
        M -= b
    elif b >= M:
        # print(M)
        money += M*a
        M = 0
    # print(M, money)
print(money)

Buggy submission (verdict: Runtime Error):

# Your code here!
import numpy as np
N, M = (int(i) for i in input().split()) 
e = np.array([[int(i) for i in input().split()] for i in range(N)])
# print(M)
# print(e)

e = e[np.argsort(e[:, 0])]
# print(e)
# arr_index = np.argsort(arr_key)
# return arr[arr_index]
# print(e.sort())
# e = np.sort(e, axis=1)
# print(e)
aaa = np.cumsum(e, axis=0)
# print(aaa)/
# print((aaa[:,1] < M))
# print(np.sum((e[:, 1] * e[:, 0])[aaa[:,1] < M]))
asf = np.sum((e[:, 1] * e[:, 0])[aaa[:,1] < M])
# print(aaa[:,1] )
# print([aaa[:,1] < M])
# print(((aaa[:, 1] * e[:, 0])[aaa[:,1] < M]))
# print(e[:, 0])
# print(aaa[:, 1])
# print(aaa)
# print([aaa[:,1] < M])
# print((e[:, 1] * e[:, 0])[aaa[:,1] <= M])
honsuu = aaa[:,1][aaa[:,1] <= M][-1]
# print(M-honsuu)
nedan = e[:,0][aaa[:,1] > M][0]
# print( e[:,0][aaa[:,1] < M])
# print(aaa[:,1])
# print(e[:,0][aaa[:,1] >= M])
# # print(nedan = e[:,1][aaa[:,1] > M][-1])
# # print(e)
# print((M-honsuu))
# print(nedan)
print(nedan*(M-honsuu)+asf)
# print(asf)