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

Fixed submission:
K = int(input())
list_k =1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51

print(list_k[K-1])

Buggy submission (verdict: Runtime Error):
h, W = map(int,input().split())
if h % 2 != 0:
    if W % 2 != 0:
        ans = ((h-1)*W//2)+(W//2+1)
else:
    ans = (h*W)//2
print(ans)
Problem p02742 (python)

Fixed submission:
h, W = map(int,input().split())
if W <= 0:
    print(0)
elif h == 1:
    print(1)
elif W == 1:
    print(1)
else:
    if h % 2 != 0:
        if W % 2 != 0:
            ans = ((h-1)*W//2)+(W//2+1)
        else:
            ans = (h*W)//2
    else:
        ans = (h*W)//2
    print(ans)

Buggy submission (verdict: Runtime Error):
h, W = map(int,input().split())
if W <= 0:
    print(0)
elif h == 1:
    print(1)
elif W == 1:
    print(0)
else:
    if h % 2 != 0:
        if W % 2 != 0:
            ans = ((h-1)*W//2)+(W//2+1)
    else:
        ans = (h*W)//2
    print(ans)

Buggy submission (verdict: Runtime Error):
h, W = map(int,input().split())
if W <= 0:
    print(0)
else:
    if h % 2 != 0:
        if W % 2 != 0:
            ans = ((h-1)*W//2)+(W//2+1)
    else:
        ans = (h*W)//2
    print(ans)

Buggy submission (verdict: Runtime Error):
h, W = map(int,input().split())
if h % 2 != 0:
    if W % 2 != 0:
        ans = ((h-1)*W//2)+(W//2+1)
else:
    ans = (h*W)//2
print(ans)

Buggy submission (verdict: Runtime Error):
h, W = map(int,input().split())
if h % 2 != 0:
    if W % 2 != 0:
        ans = (h-1)*W//2+(W//2+1)
else:
    ans = (h*W)//2
print(ans)
Problem p02748 (python)

Fixed submission:
A, B, M = list(map(int,input().split()))
list_a = list(map(int,input().split()))
list_b = list(map(int,input().split()))
buy = []
buy.append(min(list_a) + min(list_b))
for i in range(M):
    x, y, c = list(map(int,input().split()))
    buy.append(list_a[x-1] + list_b[y-1] - c)
answer = min(buy)
print(answer)

Buggy submission (verdict: Runtime Error):
A, B, M = list(map(int,input().split()))
list_a = list(map(int,input().split()))
list_b = list(map(int,input().split()))
for i in range(M):
    x, y, c = list(map(int,input().split()))
buy = []
buy.append(min(list_a) + min(list_b))
buy.append(list_a[x] + list_b[y] - c)
answer = min(buy)
print(answer)

Buggy submission (verdict: Runtime Error):
A, B, M = list(map(int,input().split()))
list_a = list(map(int,input().split()))
list_b = list(map(int,input().split()))
for i in range(M):
    x, y, c = list(map(int,input().split()))
buy = []
buy.append(min(list_a) + min(list_b))
buy.append(list_a[x] + list_b[y] - c)
answer = min(buy)
print(answer, buy)
Problem p02797 (python)

Fixed submission:
N, K, S = map(int,input().split())
ans = []


for i in range(K):
    ans.append(S)
if S == 10**9:
    for j in range(N-K):
        ans.append(7)
else:
    for j in range(N-K):
        ans.append(S+1)
print(' '.join(map(str,ans)))

Buggy submission (verdict: Runtime Error):
N, K, S = map(int,input().split())
ans = []
if N == K:
    for i in range(s):
        ans.append(K)
    print(ans)
    quit()

if S % 2 == 0:
    for i in range(K+1):
        ans.append(S//2)
    for i in range(N-K-1):
        ans.append(S+1)
    print(' '.join(map(str,ans)))
else:
    for i in range((K+1)//2):
        ans.append(S//2+1)
        ans.append(S//2)
    if K % 2 == 0:
        ans.append(S//2+1)
        for j in range(N-((K+1)//2+1)-1):
            ans.append(S+1)
    else:
        for j in range(N-((K+1)//2)-1):
            ans.append(S+1)
    print(' '.join(map(str,ans)))
Problem p02811 (python)

Fixed submission:

K, X =  map(int, input(). split())
sougaku = 500*K
if sougaku >= X:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):

K, X = input().strip().split()
K, X = [int(K), int(X)]
sougaku = 500*K
if sougaku >= X:
    print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):

K, X = input().strip().strip()
sougaku = 500*K
if sougaku >= X
    print('Yes')
    else
    print('No')
Problem p03044 (python)

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


N = int(input())
#頂点iのindexは[i-1]
tree = []
for i in range(N):
    tree.append([])

#Wが0なら偶数、1なら奇数
for i in range(N-1):
    u, v, w = map(int,input().split())
    tree[v-1].append([u-1,w % 2])
    tree[u-1].append([v-1,w % 2])
    
#print(tree)

    
color = []
for i in range(N):
    color.append(0)
    color[0] = 1
#白=-1、黒=1、無色=0

distance = 0

def poyo(x):
    global tree
    global color
    for i in tree[x]:#その頂点から行ける頂点を一覧
        if color[i[0]] == 0:#iもリスト([0]が行ける頂点、[1]が距離)
            if i[1] == 0:
                color[i[0]] = color[x]
            else:
                color[i[0]] = color[x] * (-1)
            
            poyo(i[0])


poyo(0)

for i in color:
    if i == -1:
        i = 0
        
    print(i)

Buggy submission (verdict: Runtime Error):
N = int(input())
#頂点iのindexは[i-1]
tree = []
for i in range(N):
    tree.append([])

#Wが0なら偶数、1なら奇数
for i in range(N-1):
    u, v, w = map(int,input().split())
    tree[v-1].append([u-1,w % 2])
    tree[u-1].append([v-1,w % 2])
    
#print(tree)

    
color = []
for i in range(N):
    color.append(0)
    color[0] = 1
#白=-1、黒=1、無色=0

distance = 0

def poyo(x):
    global tree
    global color
    for i in tree[x]:#その頂点から行ける頂点を一覧
        if color[i[0]] == 0:#iもリスト([0]が行ける頂点、[1]が距離)
            if i[1] == 0:
                color[i[0]] = color[x]
            else:
                color[i[0]] = color[x] * (-1)
            
            poyo(i[0])


poyo(0)

for i in color:
    if i == -1:
        i = 0
        
    print(i)
Problem p03164 (python)

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

dp = [[10**12]*((10**3)*N+1) for i in range(N+1)]
dp[0][0] = 0
v_sum = 0
for i in range(N):
    w, v = map(int,input().split())
    v_sum += v
    for j in range((10**3)*N+1):
        if j > v_sum:
            break
        if j - v >= 0:
            dp[i+1][j] = min(dp[i][j],dp[i][j-v]+w)#諸悪の根源
        else:
            dp[i+1][j] =dp[i][j]

for i in range(len(dp[-1])):
    if 0 < dp[-1][i]<= M:
        ans = i
    else:
        pass

print(ans)

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

dp = [[0]*(101) for i in range(N+1)]

for i in range(N):
    w, v = map(int,input().split())
    for j in range(10000):
        if j - v >= 0:
            dp[i+1][j] = max(dp[i][j],dp[i][j-v] + w)
        else:
            dp[i+1][j] = dp[i][j]


print(dp)

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

dp = [[0]*(W+1) for i in range(N+1)]


for i in range(N):
    w, v = map(int,input().split())
    for j in range(W+1):
        if j - w >= 0:
            dp[i+1][j] = max(dp[i][j],dp[i][j-w]+v)
        else:
            dp[i+1][j] = dp[i][j]


print(dp[-1][-1])
Problem p03220 (python)

Fixed submission:
n = int,input()
t, a = map(int,input().split())
dic_oA = {}
dic_lA = {}
H = list(map(int,input().split()))
kome = 0

for i in H:
    T = t -i*6/1000
    kome += 1        
    if T >= a:
        dic_oA[kome] = T
    else:
        dic_lA[kome] = T

if len(dic_oA) == 0:
    print(max(dic_lA,key=dic_lA.get))
elif len(dic_lA) == 0:
    print(min(dic_oA,key=dic_oA.get))
else:
    sa_o = min(dic_oA.values())- a
    sa_l = a - max(dic_lA.values())
    if sa_o > sa_l:
        print(max(dic_lA,key=dic_lA.get))
    else:
        print(min(dic_oA,key=dic_oA.get))

Buggy submission (verdict: Runtime Error):
n = int,input()
t, a = map(int,input().split())
dic_oA = {}
dic_lA = {}
H = list(map(int,input().split()))
kome = 0
for i in H:
    T = t -i*6/1000
    kome += 1        
    if T >= a:
        dic_oA[kome] = T
    else:
        dic_lA[kome] = T
if len(dic_oA) == 0:
    print(max(dic_lA,key=dic_lA.get))
elif len(dic_lA) == 0:
    print(min(dic_oA,key=dic_oA.get))

sa_o = min(dic_oA.values())- a
sa_l = a - max(dic_lA.values())

if sa_o > sa_l:
    print(max(dic_lA,key=dic_lA.get))
else:
    print(min(dic_oA,key=dic_oA.get))
Problem p03363 (python)

Fixed submission:
import math
n = int(input())
a = list(map(int,input().split()))
dic_S = {0:[0]}
S = 0
ans = 0
for i in range(n):
    S += a[i]
    if S not in dic_S:
        dic_S[S] = []
    else:
        pass
    dic_S[S].append(a[i])
    

for k in dic_S.keys():
    I = len(dic_S[k])
    if 3 <= I:
        ans += math.factorial(I) // (math.factorial(I-2)*2)
    elif I == 2:
        ans += 1
    else:
        pass
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
dic_S = {0:[0]}
S = 0
ans = 0
for i in range(n):
    S += a[i]
    if S not in dic_S:
        dic_S[S] = []
    else:
        pass
    dic_S[S].append(a[i])
    

for k in dic_S.keys():
    I = len(dic_S[k])
    if 3 <= I:
        ans += (I*(I-1))// *2
    elif I == 2:
        ans += 1
    else:
        pass
print(ans)
Problem p03557 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
ans = 0
for j in B:
    OK = -1
    NG = N
    while abs(OK-NG) > 1:
        mid = (OK + NG) // 2
        if A[mid] < j:
            OK = mid
        else:
            NG = mid
    A_ko = OK
    #print(OK)
        
    NG = -1
    OK = N
    while abs(NG-OK) > 1:
        mid = (NG + OK) // 2
        if C[mid] > j:
            OK = mid
        else:
            NG = mid
    
    C_ko = N - OK
    #print(C_ko)
    ans += (A_ko+1)*C_ko

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
ans = 0
for j in B:
    OK = -1
    NG = N
    while abs(OK-NG) > 1:
        mid = (OK + NG) // 2
        print(mid)
        if A[mid] < j:
            OK = mid
        else:
            NG = mid
    A_ko = mid
        
    left_f = -1
    right_t = N+1
    while abs(left-right) > 1:
        mid = (left + right) // 2
        if C[mid] > j:
            left_f = mid
        else:
            right_t = mid
C_ko = mid 
ans += A_ko*C_ko
print(ans)
Problem p03633 (python)

Fixed submission:
import fractions
N = int(input())
S_t = 1
for i in range(N):
    t = int(input())
    S_t = S_t * t // fractions.gcd(S_t,t)

print(S_t)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
S_t = 1
for i in range(N):
    t = int(input())
    S_t =  S_t * t // math.gcd(S_t,t)

print(S_t)
Problem p02608 (python)

Fixed submission:
N = int(input())

def shiki(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

anli = [0] * 10100


for x in range(1,150):
    if shiki(x,1,1) > N:
        break

    for y in range(1, x+1):
        if shiki(x,y,1) > N:
            break

        for z in range(1, y+1):
            
            if shiki(x,y,z) > N:
                break
            if x == y and y == z:
                anli[shiki(x,y,z)] += 1
            elif x==y or y==z or z==x:
                anli[shiki(x,y,z)] += 3
            else:
                anli[shiki(x,y,z)] += 6

for i in range(1,N+1):
    print(anli[i])

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

def shiki(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

anli = [0] * 10100


for x in range(1,150):
    if shiki(x,1,1) > N:
        break

    for y in range(1, x+1):
        if shiki(x,y,1) > N:
            break

        for z in range(1, y+1):
            if x == y and y == z:
                anli[shiki(x,y,z)] += 1
            elif x==y or y==z or z==x:
                anli[shiki(x,y,z)] += 3
            else:
                anli[shiki(x,y,z)] += 6
            if shiki(x,y,z) > N:
                break

for i in range(1,N+1):
    print(anli[i])
Problem p02921 (python)

Fixed submission:
S = input()
T = input()

count = 0

for i in range(3):
  if S[i] == T[i]:
    count += 1
    
print(count)

Buggy submission (verdict: Runtime Error):
S, T = list(input().split())

count = 0

for i in range(3):
  if S[i] == T[i]:
    count += 1
    
print(count)

Buggy submission (verdict: Runtime Error):
S, T = list(input().split())

count = 0

for i in range(3):
  if S[i] == T[i]: count += 1
    
print(count)
Problem p02922 (python)

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

i = -1
while 1:
  i += 1
  if (A-1)*i + 1 >= B:
    print(i)
    quit()

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

while 1:
  if (A-1)*i + 1 >= B:
    print(i)
    quit()
Problem p02934 (python)

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

bun = 0
for i in range(N):
  bun += 1/A[i]
  
ans = 1/bun
print(ans)

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

bun = 0
for i in range(N):
  bun += 1/A[i]
  
ans = 1/ans
print(ans)
Problem p02993 (python)

Fixed submission:
S = list(input())
flag = 0

for i in range(3):
  if S[i] == S[i+1]:
    flag = 1
    
if flag:
  print("Bad")
  
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
S = int(input())
flag = 0

for i in range(3):
  if S[i] == S[i+1]:
    flag = 1
    
if flag:
  print("Bad")
  
else:
  print("Good")
Problem p03000 (python)

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

za = 0


for count in range(N):
  za += L[count]
  if za > X:
    break

else:
  count += 1
  
print(count+1)

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

za = 0


for count in range(N):
  za += l[count]
  if za > X:
    break

print(count+1)

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

za = 0
count = 1

while za <= X:
  count += 1
  za += L[count-2]
  
print(count-1)
Problem p03030 (python)

Fixed submission:
N = int(input())
A = []
for x in range(N):
  s, p = input().split()
  A.append([s, -int(p), x+1])
  
A.sort()

for i in range(N):
  print(A[i][2])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = []
for x in range(N):
  s, p = input().split()
  A.sppend([s, -int(p), x+1])
  
A.sort()

for i in range(N):
  print(A[i][2])
Problem p03076 (python)

Fixed submission:
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

if low == []: low = [10]
ans = sum(top) + min(low) - 10
print(ans)

Buggy submission (verdict: Runtime Error):
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

if low == None: low = [0]

ans = sum(top) + min(low) - 10
print(ans)

Buggy submission (verdict: Runtime Error):
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

ans = sum(top) + min(low) - 10
print(ans)

Buggy submission (verdict: Runtime Error):
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

ans = sum(top) + min(low)
print(ans)
Problem p03206 (python)

Fixed submission:
N = int(input())

if N == 25:
    ans = 'Christmas'

elif N == 24:
    ans = 'Christmas Eve'

elif N == 23:
    ans = 'Christmas Eve Eve'

else:
    ans = 'Christmas Eve Eve Eve'

print(ans)

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

if N = 25:
    ans = 'Christmas'

elif N = 24:
    ans = 'Christmas Eve'

elif N = 23:
    ans = 'Christmas Eve Eve'

else:
    ans = 'Christmas Eve Eve Eve'

print(ans)
Problem p03219 (python)

Fixed submission:
X, Y = list(map(int, input().split()))

print(X + Y // 2)

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

print(A + B // 2)
Problem p03239 (python)

Fixed submission:
N, T = map(int, input().split())
a = []
for i in range(N):
    a.append(list(map(int, input().split())))

b = []
count = 0
for i in range(N):
    if a[i][1] <= T:
        b.append(a[i][0])
        count += 1
if count == 0:
    print('TLE')

else:
    print(min(b))

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
a = []
for i in range(N):
    a.append(list(map(int, input().split())))

b = []

for i in range(N):
    if a[i][1] <= T:
        b.append(a[i][0])

print(min(b))
Problem p03244 (python)

Fixed submission:
import collections as cole


n = int(input())
v = list(map(int, input().split()))

v1 = v[::2]   #odd
v2 = v[1::2]  #even

d1 = cole.Counter(v1)
d2 = cole.Counter(v2)

values1, counts1 = zip(*d1.most_common())
values2, counts2 = zip(*d2.most_common())

max1 = values1[0]
max2 = values2[0]

if max1 == max2:
    if len(counts1) != 1 and counts1[0] == counts1[1]:
        max1 = values1[1]
    elif len(counts2) != 1 and counts2[0] == counts2[1]:
        max2 = values2[1]
    elif len(counts1) != 1 and len(counts2) != 1:
        if counts1[1] > counts2[1]:
            max1 = values1[1]
        else:
            max2 = values2[1]
    elif len(counts1) != 1:
        max1 = values1[1]
    elif len(counts2) != 1:
        max2 = values2[1]


count = 0
if max1 != max2:
    count += len([x for x in v1 if x != max1])
    count += len([y for y in v2 if y != max2])

else:
    count += len(v1)


print(count)

Buggy submission (verdict: Runtime Error):
import collections as cole


n = int(input())
v = list(map(int, input().split()))

v1 = v[::2]   #odd
v2 = v[1::2]  #even

d1 = cole.Counter(v1)
d2 = cole.Counter(v2)

values1, counts1 = zip(*d1.most_common())
values2, counts2 = zip(*d2.most_common())

max1 = values1[0]
max2 = values2[0]

if max1 == max2:
    if len(counts1) != 1 and counts1[0] == counts1[1]:
        max1 = values[1]
    elif len(counts2) != 1 and counts2[0] == counts[1]:
        max2 = values[1]
    elif len(counts1) != 1 and len(counts2) != 1:
        if counts1[1] > counts2[1]:
            max1 = values1[1]
        else:
            max2 = values2[1]
    elif len(counts1) != 1:
        max1 = values1[1]
    elif len(counts2) != 1:
        max2 = values2[1]

print(max1, max2)
count = 0
if max1 != max2:
    count += len([x for x in v1 if x != max1])
    count += len([y for y in v2 if y != max2])

else:
    count += len(v1)


print(count)
Problem p03360 (python)

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

ans = max([A, B, C]) * (2 ** K) - max([A, B, C])

print(ans + A + B + C)

Buggy submission (verdict: Runtime Error):
A, B, C = list(map(int, input()))
K = int(input())

ans = max(A, B, C) * (2 ** K)

print(ans)

Buggy submission (verdict: Runtime Error):
A, B, C = list(map(int, input()))
K = int(input())

ans = max(A, B, C) * (2 ** K)
Problem p03380 (python)

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

left = a[-1]
sa = 199999999999999999999999999
for i in range(n):
  if sa > abs((left/2) -a[i]):
    right = a[i]
    sa = abs((left/2) - a[i])
    
print(left, right)

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

a.sort(reverse=True)
ans1 = a[0]
count = 0

if ans1 % 2 == 0:
    mid = int(ans1 / 2)
    if mid in a:
        j = mid

    elif:
        while 1:
            count += 1
            if (mid + count) in a:
                j = mid + count
                break
            elif:
                (mid - count) in a:
                j = mid + count
                break

else:
    while 1:
        count += 1
        if (mid + count) in a:
            j = mid + count
            break
        elif:
            (mid - count) in a:
            j = mid + count
            break

print(ans1, j)
Problem p03407 (python)

Fixed submission:
A, B, C = map(int, input().split())
if A + B >= C:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A + B*2 >= C:
    print('Yes')
else:
    print(No)
Problem p03415 (python)

Fixed submission:
a = [input() for i in range(3)]

answer = ""
for i in range(3):
    answer += a[i][i]
print(answer)

Buggy submission (verdict: Runtime Error):
a = []
for i in range(3):
    a.append(list(input().split()))


answer = ""
for i in range(3):
    answer += str(a[i][i])
print(answer)

Buggy submission (verdict: Runtime Error):
a = []
for i in range(3):
    a.append(list(map(int, input().split())))


answer = ""
for i in range(3):
    answer += str(a[i][i])
print(answer)
Problem p03423 (python)

Fixed submission:
N = int(input())

ans = N // 3
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(ipnut())

ans = N // 3
print(ans)
Problem p03493 (python)

Fixed submission:
s = list(input())
ans = 0
for i in range(3):
    if s[i] == '1':
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
s = list(map(int, input().split()))
ans = 0
for i in range(3):
    if s[i] == 1:
        ans += 1

print(ans)
Problem p03501 (python)

Fixed submission:
N, A, B = list(map(int, input().split()))
ans = min(A * N, B)

print(ans)

Buggy submission (verdict: Runtime Error):
N, A, B = list(map(int, input().split()))
ans = max(A * T, B)

print(ans)
Problem p03547 (python)

Fixed submission:
X, Y = list(input().split())


X = int(X, 16)
Y = int(Y, 16)

if X < Y:
    ans = '<'

elif X > Y:
    ans = '>'

else:
    ans = '='

print(ans)

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

X = int(X, 16)
Y = int(Y, 16)

if X < Y:
    ans = '<'

elif X > Y:
    ans = '>'

else:
    print('=')
Problem p03555 (python)

Fixed submission:
C1 = list(input())
C2 = list(input())

ans = 'YES'

for i in range(3):
    if C1[i] == C2[-i-1]:
        continue
    else:
        ans = 'NO'
print(ans)

Buggy submission (verdict: Runtime Error):
C1 = list(input().split())
C2 = list(input().split())

ans = 'Yes'

for i in range(3):
    if C1[i] == C2[-i-1]:
        continue
    else:
        ans = 'No'
print(ans)
Problem p03643 (python)

Fixed submission:
N = int(input())
if N < 100:
    ans = 'ABC' + '0' + str(N)
else:
    ans = 'ABC' + str(N)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(iput())
if N < 100:
    ans = '0' + str(N) + 'ABC'
else:
    ans = str(N) + 'ABC'
print(ans)
Problem p03659 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
    
A = a[0]
B = sum(a[1:])

min = abs(A - B)

for i in range(N-2):
    A += a[i+1]
    B -= a[i+1]

    if min > abs(A - B):
        min = abs(A - B)


print(min)

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

min = B

for i in range(N-1):
     A += a[i]
     B -= a[i]
     
   if min > abs(A - B):
        min = abs(A - B)
    

print(ans)
Problem p03679 (python)

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

if A >= B:
    ans = 'delicious'
elif B - A <= X:
    ans = 'safe'
else:
    ans = 'dangerous'

print(ans)

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

if A > B:
    ans = 'delicious'
elif B - A <= X:
    ans = 'safe'
else:
    'dangerous'

print(ans)
Problem p03813 (python)

Fixed submission:
x = int(input())
ans = 'ABC' if x < 1200 else 'ARC'
print(ans)

Buggy submission (verdict: Runtime Error):
x = int(input())
ans = 'ABC' if x < 1200 else 'ARC'
prit(ans)
Problem p03852 (python)

Fixed submission:
if input() in ['a','e','i','o','u']:
    print('vowel')
else:
    print('consonant')

Buggy submission (verdict: Runtime Error):
if input() in ['a','e','i','o','u'] print('vowel') else print('constant')
Problem p03962 (python)

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

ans = (a!=b) + (b!=c) + (c!=a)

ans = 1 if ans == 0 else ans

print(ans)

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

ans = (a!=b) + (b!=c) + (c!=a)

ans = 1 if ans == 0

print(ans)