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

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


n = len([1 for x in friends if x>=K])

print(n)

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

n = len([1 for x in friends if x>K])

print(n)
Problem p02899 (python)

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

classmate = [[0] * 2 for i in range(N)]

for i in range(len(number_classmate)):
    classmate[i][0] = number_classmate[i]
    classmate[i][1] = i+1

classmate.sort(key=lambda s: s[0])

mapped_list = map(str, list(i[1] for i in classmate))
first_index = ' '.join(mapped_list)

print(first_index)

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

classmate = [[0] * 2 for i in range(N)]

for i in range(len(number_classmate)):
    classmate[i][0] = number_classmate[i]
    classmate[i][1] = i+1
print(classmate)

classmate.sort(key=lambda s: s[0])

mapped_list = map(str, list(i[1] for i in classmate))
first_index = ' '.join(mapped_list)

print(first_index)
Problem p03079 (python)

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


if a==b and b==c:
    print('Yes')
else:
    print('No')

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

if a==b and b==c:
    print('Yes')
else:
    print('No')
Problem p02730 (python)

Fixed submission:
s = input()
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s1[::-1]
s3 = s[(n+3)//2-1:n]
s4 = s3[::-1]
if s1 == s2 == s3 == s4:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s = input()

def kaibun1(w):
  w = str(w)
  t = len(w)
  n = 1
  while n < t//4:
    if w[n-1] == w[(t-1)//2 - (n-1)]:
      n += 1
    else:
      return False
      break

def kaibun2(w):
  w = str(w)
  t = len(w)
  m = 1
  while m < t//4:
    if w[t+3//2-1+(m-1)] == w[t-(m-1)]:
      m += 1
    else:
      return False
      break
if len(s) == 3:
  if s[0] == s[2]:
    print('Yes')
  else:
    print('No')
else:      
  if kaibun1(s)  is False or kaibun2(s) is False:
    print('No')
  else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
s = input()

def kaibun1(w):
  w = str(w)
  t = len(w)
  n = 1
  while n < t//4:
    if w[n-1] == w[(t-1)//2 - (n-1)]:
      n += 1
    else:
      return False
      break

def kaibun2(w):
  w = str(w)
  t = len(w)
  m = 1
  while m < t//4:
    if w[t+3//2-1+(m-1)] == w[t-(m-1)]:
      m += 1
    else:
      return False
      break
if kaibun1(s)  is False or kaibun2(s) is False:
  print('No')
else:
  print('Yes')
Problem p02772 (python)

Fixed submission:
n = int(input())
a = list((int(x) for x in input().split()))
for num in a:
  if num%2 == 0:
    if num%3 != 0 and num%5 != 0:
      print('DENIED')
      exit()
print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int.input().split()))
for num in a:
  if num%2 == 0:
    if num%3 != 0 and num%5 != 0:
    print('DENIED')
    exit()
print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list((int(x) for x in input().split()))
for num in a:
  if num%2 == 0:
    if num%3 != 0 and num%5 != 0:
    print('DENIED')
    exit()
print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = (int(x) for x in input().split())
for num in a:
  if num%2 == 0:
    if num%3 != 0 and num%5 != 0:
    print('DENIED')
    exit()
print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = (int(x) for x in input().split())
for num in a:
  if num%2 = 0:
    if num%3 != 0 and num%5 != 0:
    print('DENIED')
    exit()
print('APPROVED')
Problem p02952 (python)

Fixed submission:
A = int(input())

count =  0

if A<10:
    count= A
elif A <100:
    count = 9 
elif A < 1000:
    count = 9 + A - 99
elif A < 10000:
    count = 9 + 900
elif A < 100000:
    count = 9 + 900 + (A-9999)
else:
    count = 90909
    

print(count)

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

count =  0

if A<10:
    count= A
elif A <100:
    count = 9 
elif A < 1000:
    count = 9 + A - 99
elif A < 10000:
    count = 9 + 900
elif A < 100000:
    count = 9 + 900 + (A-9999)
elif A =100000:
    count = 90909
else:
    

print(count)
Problem p02996 (python)

Fixed submission:
from operator import itemgetter

N = int(input())
a = [0] * N
b = [0] * N
c = [0] *N


for i in range(N):
    a[i],b[i] = map(int,input().split())
    c[i] = [b[i],a[i]]
   
c.sort()
sums = 0
correct = 1
for i in range(N):
    sums+=c[i][1]
    if c[i][0] < sums:
        correct=0
        break
        
if correct:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
from operator import itemgetter

N = int(input())
a = [0] * N
b = [0] * N
c = [0] *N


for i in range(N):
    a[i],b[i] = map(int,input().split())
    c[i] = [b[i],a[i]]
   
c.sort()
sums = 0
correct = 1
for i in range(N):
    sums+=c[i][0]
    if b[i][1] >sums:
        correct=0
        break

if correct:
    print("Yes")
else:
    print("No")
Problem p02791 (python)

Fixed submission:
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]<=min_p:
        cnt += 1
        min_p = p[i]
print(cnt)

Buggy submission (verdict: Runtime Error):
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]<=min_p:
        cnt += 1
        min_p = p[i]
    else:
print(cnt)

Buggy submission (verdict: Runtime Error):
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]=<min_p:
        cnt += 1
        min_p = p[i]
    else:
print(cnt)
Problem p02850 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**7)

N = int(input())
ad = [[] for _ in range(N)]
edge = []
# 0からn-1の値をとる木構造を管理する。
for _ in range(N-1):
    a, b = map(int,input().split())
    a -= 1; b -= 1
    ad[a].append(b)
    ad[b].append(a)
    edge.append((a, b))

K = max(len(S) for S in ad)
d = dict()

def dfs(v=0, pv=-1, memo=-1):
    color = 0
    for nv in ad[v]:
        if nv == pv:
            continue
        if color == memo:
            color += 1
        d[(v, nv)] = color
        d[(nv, v)] = color
        dfs(nv, v, color)
        color += 1

dfs()

print(K)
for e in edge:
    print(d[e]+1)

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

K = max(len(S) for S in ad)
d = dict()

def dfs(v=0, pv=-1, memo=-1):
    color = 0
    for nv in ad[v]:
        if nv == pv:
            continue
        if color == memo:
            color += 1
        d[(v, nv)] = color
        d[(nv, v)] = color
        dfs(nv, v, color)
        color += 1

dfs()

print(K)
for e in edge:
    print(d[e]+1)
Problem p02946 (python)

Fixed submission:
k,x=map(int, input().split())
min_ans=x-k+1
max_ans=x+k-1
ans_list=list(range(min_ans,max_ans+1))
for i in range(len(ans_list)):
  ans_list[i]=str(ans_list[i])
ans=" ".join(ans_list)
print(ans)

Buggy submission (verdict: Runtime Error):
k,x=map(int, input().split())
min_ans=x-k+1
max_ans=x+k-1
ans_list=list(range(min_ans,max_ans+1))
print(" ".join(ans_list))
Problem p02993 (python)

Fixed submission:
s = input()
flag = True
for i in range(1,4):
  if s[i-1]==s[i]:
    flag = False
print("Bad" if flag==False else "Good")

Buggy submission (verdict: Runtime Error):
s = input()
flag = True
  for i in range(1,4):
    if s[i-1]==s[i]:
      flag = False
print("Bad" if flag==False else "Good")

Buggy submission (verdict: Runtime Error):
s = input()
flag = True:
  for i in range(1,4):
    if s[i-1]==s[i]:
      flag = False
print("Bad" if flag==False else "Good")
Problem p02995 (python)

Fixed submission:
import fractions

a,b,c,d = map(int, input().split())
nc = b//c-(a-1)//c
nd = b//d-(a-1)//d

# e = lcm(c,d)
e = c*d//fractions.gcd(c,d)
nc_d = b//e-(a-1)//e
print(b-a+1-nc-nd+nc_d)

Buggy submission (verdict: Runtime Error):
import math

a,b,c,d = map(int, input().split())
nc = b//c-(a-1)//c
nd = b//d-(a-1)//d

# e = lcm(c,d)
e = c*d//math.gcd(c,d)
nc_d = b//e-(a-1)//e
print(b-a+1-nc-nd+nc_d)
Problem p03001 (python)

Fixed submission:
W,H,x,y=map(int,input().split())
S=W*H/2
ans=0
if x==W/2 and y==H/2:
  ans=1

print(S,ans)

Buggy submission (verdict: Runtime Error):
W,H,x,y=map(int,input().split())
S=W*H/2
ans=0
if x==w/2 and y==h/2:
  ans=1

print(S,ans)
Problem p03059 (python)

Fixed submission:
A,B,T = map(int, input().split())
ans = B*int(T/A)
print(ans)

Buggy submission (verdict: Runtime Error):
import functools
import fractions
N = int(input())
A_list = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A_list[-i]
    del A_list[-i]
    gcd = functools.reduce(fractions.gcd, A_list)
    ans = max(gcd,ans)
    A_list.append(x)
print(ans)
Problem p03061 (python)

Fixed submission:
#累積GCDによるsolution : O(N)
from fractions import gcd

N = int(input())
A = list(map(int, input().split()))
B = [A[0]]+[0]*(N-1)
C = [0]*(N-1)+[A[-1]]
for i in range(N-1):
    B[i+1] = gcd(A[i+1],B[i])
for i in range(N):
    C[-i-1] = gcd(A[-i-1],C[-i])

ans = 0
for i in range(1,N-1):
    ans = max(gcd(B[i-1],C[i+1]),ans)
# in case of i=0,N-1
ans = max(ans,C[1])
ans = max(ans,B[-2])
print(ans)

Buggy submission (verdict: Runtime Error):
import functools
import math
N = int(input())
A = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A[-i]
    del A[-i]
    gcd = functools.reduce(math.gcd, A)
    ans = max(gcd,ans)
    A.append(x)
print(ans)
Problem p03071 (python)

Fixed submission:
A,B = map(int, input().split())
if A>B:
  print(2*A-1)
elif A==B:
  print(A+B)
else:
  print(2*B-1)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
if A>B:
  print(2A-1)
elif A==B:
  print(A+B)
else:
  print(2B-1)
Problem p03085 (python)

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

Buggy submission (verdict: Runtime Error):
#累積和による解法

N,Q = map(int, input().split())
S = input()
cnt_list = []

for i in range(N+1):
    S_part = S[:i]
    cnt = S_part.count("AC")
    cnt_list.append(cnt)
for j in range(Q):
    l,r = map(int, input().split())
    ans = cnt_list[r]-cnt_list[l-1]
    if S[l-1:l+1]=="CA":
        ans -= 1
    print(ans)

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

Buggy submission (verdict: Runtime Error):
b = input()
if b = "A":
  print("T")
elif b = "T":
  print("A")
elif b = "C":
  print("D")
else:
  print("C")

Buggy submission (verdict: Runtime Error):
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("D")
else b == "D":
  print("C")

Buggy submission (verdict: Runtime Error):
b = input()
if b = "A":
  print("T")
elif b = "T":
  print("A")
elif b = "C":
  print("D")
else b = "D":
  print("C")

Buggy submission (verdict: Runtime Error):
x = input()
if x = "A":
  print("T")
elif x = "T":
  print("A")
elif x = "C":
  print("D")
else x = "D":
  print("C")
Problem p03101 (python)

Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))

Buggy submission (verdict: Runtime Error):
N,M,C = map(int, input().split())
B = list(map(int, input().split()))
ans = 0
for i in range(N):
  A = list(map(int, input().split()))
  condition = C
  for j in range(M):
    condition += A[j]*B[j]
  if condition > 0:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print{(H-h)*(W-w)}

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split(" "))
X, y = map(int, input().split(" "))
print{(x-X)*(y-Y)}

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, Y = map(int, input().split("  "))
print{(x-X)*(y-Y)}

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, Y = map(int, input().split("  "))
ptint{(x-X)*(y-Y)}

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, y = map(int, input().split("  "))
print{(x-X)*(y-Y)}

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, y = map(int, input().split("  "))
ptint{(x-X)*(y-Y)}
Problem p03103 (python)

Fixed submission:
N,M = map(int, input().split())
A = []
quantity = 0
price = 0

for i in range(N):
    a = list(map(int, input().split()))
    A.append(a)
A = sorted(A)
for i in range(M):
    quantity += A[i][1]
    if quantity < M:
        price += A[i][0]*A[i][1]
    else:
       price += A[i][0]*(M-(quantity-A[i][1]))
       break
print(price)

Buggy submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = []
quantity = 0
price = 0

for i in range(N):
    a = list(map(int, input().split()))
    A.append(a)
A = sorted(A)
for i in range(M):
    quantity += A[i][1]
    if quantity <= M:
        price += A[i][0]*A[i][1]
    else:
       price += A[i][0]*(M-(quantity-A[i][1]))
       break
print(price)

Buggy submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = []
quantity = 0
price = 0

for i in range(N):
    a = list(map(int, input().split()))
    A.append(a)
print(A)
A = sorted(A)
for i in range(M):
    quantity += A[i][1]
    if quantity <= M:
        price += A[i][0]*A[i][1]
    else:
       price += A[i][0]*(M-(quantity-A[i][1]))
       break
print(price)
Problem p03109 (python)

Fixed submission:
y,m,d = map(int, input().split("/"))
if  m >= 5 :
  print("TBD")
else:
  print("Heisei")

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += int(a)*380000
print(ans)
Problem p03110 (python)

Fixed submission:
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += float(a)*380000
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += int(a)*380000
print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
ans = 0

for i in range(N):
  a,b = map(float, input().split())
  if b =="JPY":
    ans += a
  else:
    ans += a*380000
print(ans)
Problem p03145 (python)

Fixed submission:
AB,BC,CA = map(int, input().split(" "))
print(int(AB*BC/2))

Buggy submission (verdict: Runtime Error):
AB,BC,CA = map(int, input().split("|  |"))
print(AB*BC/2)
Problem p03160 (python)

Fixed submission:
N = int(input())
h_list = list(map(int, input().split()))
dp = [0,abs(h_list[1]-h_list[0])]
for i in range(1,N-1):
    step_1 = dp[i]+abs(h_list[i+1]-h_list[i])
    step_2 = dp[i-1]+abs(h_list[i+1]-h_list[i-1])
    dp_ans = min(step_1,step_2)
    dp.append(dp_ans)
print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
h = list(map(int, input().split()))
dp = [0,abs(h[1]-h[0])]

for i in range(2,N):
    dp_i = 1000000000000000000000
    for j in range(1,K+1):
        if i-j >= 0:
            step_j = dp[i-j] + abs(h[i]-h[i-j])
            dp_i = min(step_j,dp_i)
        else:
            dp.append(dp_i)
            break
    dp.append(dp_i)
print(dp[-1])
Problem p03206 (python)

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

Buggy submission (verdict: Runtime Error):
D = int(input())
print(Christmas if D == 25, Christmas Eve if D ==24, Christmas Eve Eve if D == 23, Christmas Eve Eve Eve else)
Problem p03238 (python)

Fixed submission:
if int(input()) == 1:
    print("Hello World")

else:
    A = int(input())
    B = int(input())
    print(A + B)

Buggy submission (verdict: Runtime Error):
N = input()
if N == 1:
  print("Hello World")
else:
  A = input()
  B = input()
  print(int(A+B))

Buggy submission (verdict: Runtime Error):
N = input()
A = input()
B = input()
if N == 1:
  print("Hello World")
else:
  print(int(A+B))

Buggy submission (verdict: Runtime Error):
N = input()
A = input()
B = input()
if N == 1:
  print("Hello World")
else:
  print(A+B)
Problem p03260 (python)

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

Buggy submission (verdict: Runtime Error):
import fractions

N,X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x.sort()

if N != 1:
    A = [0]*(N-1)
    for i in range(N-1):
        A[i] = x[i+1]-x[i]

    a = A[0]
    for i in range(N-1):
        a = fractions.gcd(a,A[i])
    print(a)
else:
    print(x[1]-x[0])

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
print ("Yes" if a*b%2==1 else “No”)
Problem p03262 (python)

Fixed submission:
import fractions

N,X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x.sort()

if N != 1:
    A = [0]*N
    for i in range(N):
        A[i] = x[i+1]-x[i]
    a = A[0]
    for j in range(N):
        a = fractions.gcd(a,A[j])
    print(a)
else:
    print(x[1]-x[0])

Buggy submission (verdict: Runtime Error):
import math

N,X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x.sort()

if N != 1:
    A = [0]*(N-1)
    for i in range(N-1):
        A[i] = x[i+1]-x[i]

    a = A[0]
    for i in range(N-1):
        a = math.gcd(a,A[i])
    print(a)
else:
    print(x[1]-x[0])
Problem p03264 (python)

Fixed submission:
K = int(input())
if K%2 == 0:
  print(int((K/2)**2))
else:
  print(int((K-1)*(K+1)/4))

Buggy submission (verdict: Runtime Error):
k = int(input())
if k%2==1:
  print((k//2)*(k//2+1))
else:
  print(k//2)**2

Buggy submission (verdict: Runtime Error):
k = int(input())
if k%2==1:
  print(k//2*(k//2+1))
else:
  print(k//2)**2

Buggy submission (verdict: Runtime Error):
K = int(input())
if K%2 == 0:
  print(int((K/2)**2))
else:
  print(int((K-1)(K+1)/4))

Buggy submission (verdict: Runtime Error):
K = int(input())
if K%2 == 0:
  print((K/2)**2)
else:
  print((K-1)(K+1)/4)
Problem p03289 (python)

Fixed submission:
S = list(input())
ans = 0
for i in range(2,len(S)-1):
  if S[i] == "C":
    ans += 1
    S[i] = S[i].lower()
if S[0]=="A" and ans==1:
  S[0] = S[0].lower()
  s = ""
  for i in range(len(S)):
    s += S[i]
  if s.islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
S = list(input())
cnt = 0

array = S[3:-1]
if array.count("C")==1:
  array.remove("C")
  S = S[:3]+array+S[-1]
else:
  cnt += 1

if S[0]=="A":
  del S[0]
else:
  cnt += 1

s = "".join(S)
if s.islower == False:
  cnt += 1
print("AC" if cnt==0 else "WA")

Buggy submission (verdict: Runtime Error):
S = list(input("Enter :"))
ans = 0
C_location = 0
for i in range(2,len(S)-1):
  if S[i] == "C":
    ans += 1
	S[i].lower()
if all(S[0]=="A" and ans==1):
  S.swapcase(S[0])
  if S.islower():
	print("AC")
  else:
    print("WA")
else:
  print("WA")
Problem p03316 (python)

Fixed submission:
N = input()
mylist = []
for i in range(len(N)):
  mylist.append(N[i])
newlist = [int(s) for s in mylist]
divisor = 0
for j in range(len(newlist)):
  divisor += newlist[j]
N = int(N)
if N%divisor == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
S = 0
for n in N:
  S += n
N = int(N)
print("Yes" if N%S == 0 else "No")

Buggy submission (verdict: Runtime Error):
N = input()
S = 0
for n in N:
  S += n
N = int(N)
print("Yes" if N%S == 0 else "No")
Problem p03408 (python)

Fixed submission:
N = int(input())
S = [input() for _ in range(N)]
M = int(input())
T = [input() for _ in range(M)]

ans = 0
for i in S:
  cnt1 = S.count(i)
  cnt2 = T.count(i)
  ans = max(cnt1-cnt2,ans)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [0]*N
for i in range(N):
  S[i] = input()
  
M = int(input())
T = [0]*M
for i in range(N):
  T[i] = input()

ans = 0
for i in range(N):
  x = S[i]
  cnt1 = S.count(x)
  cnt2 = T.count(x)
  ans = max(cnt1-cnt2,ans)
print(ans)
Problem p03415 (python)

Fixed submission:
C=[]
for i in range(3):
  C.append(list(input()))
print(C[0][0]+C[1][1]+C[2][2])

Buggy submission (verdict: Runtime Error):
C=[]
for i in range(3):
  C += list(input())
print(C[0][0]+C[1][1]+C[2][2])
Problem p03469 (python)

Fixed submission:
S = list(map(str, input().split("/")))
S[0] = "2018"
s = "/".join(S)
print(s)

Buggy submission (verdict: Runtime Error):
date = [for n in input()]
date[3]="8"
date = "".join(date)
print(date)

Buggy submission (verdict: Runtime Error):
date = input()
date[3]=8
print(date)
Problem p03477 (python)

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

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

Fixed submission:
s = input()
print(s.count('1'))

Buggy submission (verdict: Runtime Error):
s = input()
print(s.count('1'))

Buggy submission (verdict: Runtime Error):
y = list(input())
# y = [0,1,0]のようなリストになっているはず
x = 0
for i in range(0,2):
	if y[i] == 1:
      x += 1
    else:
      continue
print(x)

Buggy submission (verdict: Runtime Error):
y = list(input())
# y = [0,1,0]のようなリストになっているはず
x = 0
for i in range(0,2):
	if y[i] == 1:
      x += 1
print(x)

Buggy submission (verdict: Runtime Error):
y = list(input())
n = sum(y[i]=1 for i in y)
print(n)
Problem p03547 (python)

Fixed submission:
x,y = map(str, input().split())
if int(x,16) > int(y,16):
  print(">")
elif int(x,16) < int(y,16):
  print("<")
else:
  print("=")

Buggy submission (verdict: Runtime Error):
X,Y = map(str, input().split())
if hex(X)<hex(Y):
  print("<")
elif hex(X)>hex(Y):
  print(">")
else:
  print("=")

Buggy submission (verdict: Runtime Error):
X,Y = map(int, input().split())
if hex(X)<hex(Y):
  print("<")
elif hex(X)>hex(Y):
  print(">")
else:
  print("=")
Problem p03555 (python)

Fixed submission:
c1 = list(input())
c2 = list(input())

if c1==c2[::-1]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
x = input()
y = input()
print("YES" if x=y[::-1] else "NO")