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

Fixed submission:
N = int(input())
str = "Christmas"
 
if N != 25:
	while N < 25:
		str += " Eve"
		N += 1
        
print(str)

Buggy submission (verdict: Runtime Error):
N = int(input())
str = "Christmas"
 
if N != 25:
	while N >= 22:
		str += " Eve"
        N -= 1
        
print(str)
Problem p03408 (python)

Fixed submission:
BlueN = int(input())
BlueList = []
for i in range(0,BlueN):
  BlueList.append(input())

RedN = int(input())
RedList = []
for i in range(0,RedN):
  RedList.append(input())

stocker = 0

for i in set(BlueList):
  if BlueList.count(i) * 1 + RedList.count(i) * -1 >= stocker:
    stocker = BlueList.count(i) * 1 + RedList.count(i) * -1

print(stocker)

Buggy submission (verdict: Runtime Error):
BlueN = int(input())
BlueList = []
for i in range(1,BlueN):
  BlueList.append(input())

RedN = int(input())
RedList = []
for i in range(1,RedN):
  RedList.append(input())

stocker = 0

for i in set(BlueList):
  if BlueList.count(i) * 1 + RedList.count(i) * -1 >= stocker:
    stocker = BlueList.count(i)

print(stocker)
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")
Problem p03493 (python)

Fixed submission:
N = input()
ctr = 0
for i in N:
	if i == "1":ctr+=1
print(ctr)

Buggy submission (verdict: Runtime Error):
N = input()
ctr = 0
for i in range(0,len(N)-1):
	if N[i] = "1":ctr+=1
print(ctr)
Problem p02981 (python)

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

Buggy submission (verdict: Runtime Error):
n, a, b = map( int, input() )
print( min( n*a, b ) )
Problem p03760 (python)

Fixed submission:
o = list(input())
e = list(input()) + [""]

for x,y in zip( o, e ) : print( x+y, end="" )

Buggy submission (verdict: Runtime Error):
o = input()
e = input() + [""]

for x,y in zip( o, e ) : print( x+y, sep="" )
Problem p04044 (python)

Fixed submission:
n, l = map( int, input().split( ' ' ) )
strs = sorted( [ input() for i in range(n) ] )
print( ''.join( strs ) )

Buggy submission (verdict: Runtime Error):
input_N_L = input()
#print( input_N_L )
N, L = map( int, input_N_L.split() )

#print( N )
#print( L )

str_set = []
for i in range( L ):
  str_set.append( input() )
#print( array )

sorted_str = ""
for s in sorted( str_set ):
  sorted_str += s
print( sorted_str )

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

str_set = set()
for i in range( L ):
  str_set.add( input() )

sorted_str = ""
for s in sorted( str_set ):
  sorted_str += s
print( sorted_str )

Buggy submission (verdict: Runtime Error):
input_N_L = input()
#print( input_N_L )
N, L = map( int, input_N_L.split() )

#print( N )
#print( L )

str_set = set()
for i in range( L ):
  str_set.add( input() )
#print( array )

sorted_str = ""
for s in sorted( str_set ):
  sorted_str += s
print( sorted_str )

Buggy submission (verdict: Runtime Error):
array_temp = input.split()
N = array[0]
L = array[1]
strs = array[2:]
strs.sort()
print(strs)
Problem p04046 (python)

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

SIZE = h+w+2
MOD = 10**9 + 7
MOD_Farmer = 10**9+5

fact = [0] * SIZE
inv = [0] * SIZE
fact_inv = [0] * SIZE

# prepare --------------------------------
inv[0] = 0
inv[1] = 1
fact[0] = fact[1] = 1
fact_inv[0] = fact_inv[1] = 1
for i in range( 2, SIZE ):
  inv[i] = MOD - (MOD//i)*inv[MOD%i]%MOD
  fact[i] = fact[i-1] * i % MOD
  fact_inv[i] = fact_inv[i-1] * inv[i] % MOD
#  fact_inv[i] = fact[i] **( 10**4 ) \
#              * fact[i] **( 10**5 ) \
#              * fact[i] ** 5 % MOD % MOD
# ----------------------------------------
def comb( n, r ):
  if r >= 0 and n >= 0:
    return fact[n] * fact_inv[n-r]%MOD * fact_inv[r]%MOD
  else :
    return 0.0
# ----------------------------------------

#print( fact_inv )

ans = 0
for i in range( h-a ):
    ans += comb(i+b-1, b-1) * comb(h-i-1+w-b-1,w-b-1)
    ans %= MOD
print( ans )

Buggy submission (verdict: Runtime Error):
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

h, w, a, b = map( int, input().split() )

ans = 0
mod_parent = 10**9 + 7
for i in range( 1, w-b ) :
  ans += ( cmb( h-a-1+i, i ) %  mod_parent ) + ( cmb( a+w-i-2, a-1 ) %  mod_parent )
print( ans )

Buggy submission (verdict: Runtime Error):
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

h, w, a, b = map( int, input().split() )

ans = 0
mod_parent = 10**9 + 7
for i in range( a+1 ) :
  ans += ( cmb( b+h-a, i ) %  mod_parent ) + ( cmb( h+w-b, h-i ) %  mod_parent )
print( ans )
Problem p03361 (python)

Fixed submission:
h, w = list(map(int, input().split()))
s = [list(input()) for i in range(h)]
dir = [[-1, 0], [1, 0], [0, -1], [0, 1]]
for y in range(h):
    for x in range(w):
        can_put = True
        if s[y][x] == "#":
            for dx, dy in dir:
                cx = x + dx
                cy = y + dy
                if cx >= 0 and cx < w and cy >= 0 and cy < h:
                    if s[cy][cx] == "#":
                        can_put = True
                        break
            else:
                can_put = False
        if can_put == False:
            break
    else:
        continue
    break
if can_put == True:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
h, w = list(map(int, input().split()))
s = [list(input()) for i in range(h)]
dir = [[-1, 0], [1, 0], [0, -1], [0, 1]]
for y in range(h):
    for x in range(w):
        can_put = True
        if s[y][x] == "#":
            for dx, dy in dir:
                cx = x + dx
                cy = y + dy
                if x >= 0 and x < w and y >= 0 and y < h and s[cy][cx] == "#":
                    can_put = True
                    break
            else:
                can_put = False
        if can_put == False:
            break
if can_put == True:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
h, w = list(map(int, input().split()))
s = [list(input()) for i in range(h)]
dir = [[-1, 0], [1, 0], [0, -1], [0, 1]]
for y in range(h):
    for x in range(w):
        if s[y][x] == "#":
            for dx, dy in dir:
                cx = x + dx
                cy = y + dy
                if x >= 0 and x < w and y >= 0 and y < h and s[cy][cx] == "#":
                    break
            else:
                break
    else:
        continue
    print("No")
    break
else:
    print("Yes")
Problem p03455 (python)

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

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

Buggy submission (verdict: Runtime Error):
num = int(input())
a = list(map(int, input().split()))
count = 0
while(True):
    for i in range(num):
        if a[i] % 2 != 0:
            break
        else:
            a[i] /= 2
    else:
        count += 1
        continue
    break
print(count)
Problem p02981 (python)

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

ans = min([b,n*a])

print(ans)

Buggy submission (verdict: Runtime Error):
l,r = map(int,input().split())

if r-l >= 2019:
  ans = 0
else:
  mod_l = l % 2019  
  mod_r = r % 2019
  if mod_r < mod_l:
    ans = 0
  elif mod_l * mod_r == 0:
    ans = 0
    
  else:
    l_list=[]
    a = list(range(mod_l, mod_r+1))
    for i in range(mod_l, mod_r+1):
      ai = a[i]
      for j in range(i+1,mod_r+1):
        aj = a[j]
    l = (ai*aj) % 2019
    l_list.append(l)
    ans = min(l_list)
    
print(ans)
Problem p03085 (python)

Fixed submission:
b = input()

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

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

Fixed submission:
import numpy as np
a,b = input().split()
print(int(np.ceil((int(a)+int(b))/2)))

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b = input().split()
print('{:.0f}'.np.ceil((int(a)+int(b))/2))

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b = int(input().split())
np.trunc((a+b)/2)

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b = input().split()
np.trunc((a+b)/2)

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b = input().split()
np.trunc((a+b)2)

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b = input().split()
np.trunc(a+b/2)

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b = input().split()
numpy.trunc(a+b/2)
Problem p02923 (python)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
count=0
a=[0]
for i in range(1,n):
  if h[i]<=h[i-1]:
    count+=1
    a.append(count)
  else: 
    
    count=0

print(max(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
count=0
a=[]
for i in range(1,n):
  if h[i]<=h[i-1]:
    count+=1
    a.append(count)
  else: 
    
    count=0

print(max(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
count=1
a=[]
for i in range(1,n):
  if h[i]<h[i-1]:
    count+=1
  else: 
    a.append(count)
    count=0
print(max(a))
Problem p03408 (python)

Fixed submission:
#n=[input() for _ in range(int(input()))]
#m=[input() for _ in range(int(input()))]
n1=int(input())
n=[input() for i in range(n1)]
m1=int(input())
m=[input() for i in range(m1)]
#print(n)
#print(m)
l=list(set(n))
#print(l)
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
#print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Buggy submission (verdict: Runtime Error):
n=int(input())
nlist=[input() for i in range(n)]
m=int(input())
mlist=[input() for i in range(m)]
set1=set(nlist)
print(mlist)
print(max(0,max(nlist.count(set1[i])-mlist.count(set1[i]) for i in len(set1))))
Problem p03434 (python)

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

Buggy submission (verdict: Runtime Error):
input()
a=sorted(map(int, input().split()))[::-1]
print(sum(a[::2]-sum(a[1::2]))
Problem p03478 (python)

Fixed submission:
n,a,b = map(int, input().split())
print(sum(i for i in range(n+1) if a<=sum(map(int,str(i)))<=b))

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, unput().split())
print(sum(i for i in range(n+1) if a<=sum(map(int,str(i)))<=b))
Problem p03493 (python)

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
print(input().count(1))
Problem p03760 (python)

Fixed submission:
O=list(input())
E=list(input())+[""]
for o,e in zip(O,E): print(o+e,end="")

Buggy submission (verdict: Runtime Error):
O=list(input())
E=(input())+[""]
for o,e in zip(O,E): print(o+e,end="")
Problem p02917 (python)

Fixed submission:
import sys
N = int(input())
B = [int(i) for i in input().split()]

A =[]
if N == 2:
    print(N*B[0])
    sys.exit()
else:
    if B[1] >= B[0]:
      A.append(B[0])
      A.append(B[0])
    else:
      A.append(B[0])
      A.append(B[1])
    for i in range(1,len(B)-1):
        if B[i+1] >= B[i]:
          A.append(B[i])
        else:
          A.append(B[i+1])
 
x = 0
for y in A:
  x = x + y
print(x+B[-1])

Buggy submission (verdict: Runtime Error):
N = int(input())
B = [int(i) for i in input().split()]

if N == 2:
  print(N*B)
else:
  for i in B:
    if B[i] > B[i+1]:
      A[i] = B[i]
      A[i+1] = B[i]
    else:
      A[i] = B[i]
      A[i+1] = B[i+1]

x = 0
for x in A:
  x = x + A
print(x)
Problem p02934 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
 
b = 0
for i in range(0,N):
    b = b + 1/a[i]
print(1/b)

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

b = 0
 for i in range(0,N):
    b = b + 1/a[i]
print(1/b)
Problem p02969 (python)

Fixed submission:
r = int(input())

print(3*r**2)

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

x = 2*D+1
y = N/x
z = N//x
if z==0:
    print(y)
else:
    print(z+1)
Problem p03035 (python)

Fixed submission:
age, price = map(int, input().split())
if age >= 13:
	print(price)
elif 6 <= age <= 12:
	print(price // 2)	
else:
	print(0)

Buggy submission (verdict: Runtime Error):
age, price = map(int, input().split())
if age >= 13:
	print(price)
elif: 6 <= age <= 12:
	print(price // 2)	
else:
	print(0)
Problem p03102 (python)

Fixed submission:
N, M, C = map(int, input().split())
b = list(map(int, input().split()))
codes = [list(map(int, input().split())) for _ in range(N)]

res = 0
for code in codes:
    s = C
    
    for i in range(M):
        s += (code[i] * b[i])

    if s > 0:
        res += 1

print(res)

Buggy submission (verdict: Runtime Error):
b = list(map(int, input().split()))
codes = [list(map(int, input().split())) for _ in range(N)]

res = 0
for code in codes:
    s = C    
    for i in range(M):
        s += (code[i] * b[i])
    if s > 0:
        res += 1

print(res)
Problem p02924 (python)

Fixed submission:
N = int(input())

ans = (N * (N-1) // 2)
print(ans)

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

ans = int(N(N-1)/2)
print(ans)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
N = int(input())
 
ans = int(N(N-1)/2)
Problem p02947 (python)

Fixed submission:
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import combinations

N = int(input())
c = ["".join(sorted(str(input()))) for x in range(N)]
cs = Counter(c)

ans=0
for i in cs.values():
    if i!=1:
        ans += (i * (i-1))/2

print(int(ans))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from collections import Counter
from itertools import combinations
import math

N = int(input())
c = ["".join(sorted(str(input()))) for x in range(N)]
cs = Counter(c)

ans=0
for i in cs.values():
    ans += math.factorial(i)/2

print(int(ans))
Problem p02957 (python)

Fixed submission:
# -*- coding: utf-8 -*-

A, B = map(int, input().split())

ans = (((B-A)/2)+A)
if ans.is_integer():
    print(int(ans))
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

A, B = map(int, input().split())

ans = ((B-A/2)+A)
if isinstance(int, ans):
    print(ans)
else:
    print("IMPOSSIBLE")
Problem p02981 (python)

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

print(min(N*A, B))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import itertools
import math

N, D = map(int, input().split())

X = [[0 for x in range(D)] for y in range(N)]

for n in range(N):
    X[n] = list(map(int, input().split()))

ans = 0
for target in itertools.combinations(X, 2):
    res = sum([(y - z) ** 2 for y, z in zip(target[0], target[1])])
    res = math.sqrt(res)
    if res.is_integer():
        ans += 1

print(ans)
Problem p02995 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
import fractions
 
def num_divide(p, q, r):
    if p % r == 0:
        rmin = p
    else:
        rmin = p + (r-p%r)
    rmax = q - q%r
    return (rmax-rmin)//r + 1
 
print(b - a + 1 - (num_divide(a, b, c) + num_divide(a, b, d) - num_divide(a, b, c * d // fractions.gcd(c, d))))

Buggy submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())
import math

dc = math.floor(B/C) - math.floor((A-1)/C)
dd = math.floor(B/D) - math.floor((A-1)/D)
lcmCD = (C*D)/math.gcd(C,D)
dcd = math.floor(B/lcmCD) - math.floor((A-1)/lcmCD)

print(B-A+1 - (dc + dd - dcd))

Buggy submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())

dc = math.floor(B/C) - math.floor((A-1)/C)
dd = math.floor(B/D) - math.floor((A-1)/D)
lcmCD = (C*D)/math.gcd(C,D)
dcd = math.floor(B/lcmCD) - math.floor((A-1)/lcmCD)

print(B-A+1 - (dc + dd - dcd))
Problem p02999 (python)

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

if X < A:
    print(0)
else:
    print(10)

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

if X < A:
    print(0)
else:
    print(10)
Problem p03029 (python)

Fixed submission:
import math
A, P = map(int, input().split())

print(math.floor((P+3*A)/2))

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

print(round((P+3*A)/2))
Problem p03085 (python)

Fixed submission:
print("ATACGC"["ATACGC".find(str(input()))+1])

Buggy submission (verdict: Runtime Error):
b = str(input())
atcg = [["A", "T"],["C", "G"]]

for i in atcg:
  if b in i:
    print(i.remove(b)[0])
    break

Buggy submission (verdict: Runtime Error):
b = str(input())
atcg = [["A","T"]["C","G"]]

for i in atcg:
  if b in i:
    print(i.pop(b)[0])
    break
Problem p03109 (python)

Fixed submission:
print(["TBD","Heisei"][int(20190430>=int(str(input()).replace("/","")))])

Buggy submission (verdict: Runtime Error):
print(["TBD","Heisei"][int(20190430>=int(str(input()).replace("/","")))]
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(A-B)

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

if B%A == 0
	print(A+B)
else:
  	print(A=B)
Problem p03160 (python)

Fixed submission:
# -*- coding:utf-8 -*-

N = int(input())
h = list(map(int, input().split()))

dp = [float("inf")]*N
dp[0] = 0
for i in range(1, N):
    cost1 = abs(h[i] - h[i-1])
    dp[i] = min(dp[i], dp[i-1] + cost1)
    if i > 1:
        cost2 = abs(h[i] - h[i - 2])
        dp[i] = min(dp[i], dp[i-2] + cost2)

print(dp[-1])

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
# https://atcoder.jp/contests/dp/tasks/dp_a
import math

N = int(input())
h = list(map(int, input().split()))

dp = [math.inf]*N
dp[0] = 0
for i in range(1, N):
    cost1 = abs(h[i] - h[i-1])
    dp[i] = min(dp[i], dp[i-1] + cost1)
    if i > 1:
        cost2 = abs(h[i] - h[i - 2])
        dp[i] = min(dp[i], dp[i-2] + cost2)

print(dp[-1])
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):
if int(input())==1:
    print("Hello World")
else:
  	a = int(input())
    b = int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
if int(input())==1:
	print("Hello World")
else:
  	a = int(input())
    B = int(input())
    print(a+b)
Problem p02953 (python)

Fixed submission:
#C - Build Stairs
N=int(input())
H=list(map(int, input().split()))
t=True
M=H[0]
for i in range(1,N):
    if M<H[i]:
        M=H[i]
    if M>H[i]+1:
        print("No")
        t=False
        break
if t:
    print("Yes")

Buggy submission (verdict: Runtime Error):
#C - Build Stairs
N=int(input())
H=list(map(int, input().split()))
t=True
for i in range(1,N+1):
    M=max(H[:i])
    if M>min(H[i:])+1:
        print("No")
        t=False
        break
if t:
    print("Yes")

Buggy submission (verdict: Runtime Error):
#C - Build Stairs
N=int(input())
H=list(map(int, input().split()))
t=True
for i in range(1,N+1):
    M=max(H[:i])
    if M>min(H[i:])+1:
        print("No")
        t=False
        break
if t:
    print("Yes")
Problem p02957 (python)

Fixed submission:
#A-Harmony
X=list(map(int, input().split()))
K=(X[0]+X[1])/2
if (X[0]+X[1])%2==0:
    print(int(K))
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
#A-Harmony
X=map(int, input().split())
K=(X[0]+X[1])/2
if (X[0]+X[1])%2==0:
    print(K)
else:
    print("IMPOSSIBLE")
Problem p03000 (python)

Fixed submission:
#B - Bounding(ABC130)
A=list(map(int, input().split()))
L=list(map(int, input().split()))
D=0
C=1
for i in L:
    D+=i
    if D<=A[1]:
        C+=1
    else:
        print(C)
        break
else:
    print(A[0]+1)

Buggy submission (verdict: Runtime Error):
#B - Bounding(ABC130)
A=list(map(int, input().split()))
L=list(map(int, input().split()))
D=0
C=1
for i in L:
    D+=i
    if D<=A[1]:
        C+=1
    else:
        print(C)
        break
else:
    print(N)
Problem p03076 (python)

Fixed submission:
# B - Five Dishes(ABC123)
B=[]
C=[]
for i in range(5):
    S=int(input())
    if S%10==0:
        C.append(S)
    else:
        C.append(S+(10-S%10))
    if S%10!=0:
        B.append(S%10)
if B==[]:
    print(sum(C))
else:
    print(sum(C)-(10-min(B)))

Buggy submission (verdict: Runtime Error):
#B - Five Dishes(ABC123)
B=[]
C=[]
for i in range(5):
    S=int(input())
    if S%10==0:
        C.append(S)
    else:
        C.append(S+(10-S%10))
    if S%10!=0:
        B.append(S%10)
print(sum(C)-(10-min(B)))
Problem p03103 (python)

Fixed submission:
#C - Energy Drink Collector(ABC121)
N,M=map(int, input().split())
X=[]
for i in range(N):
    a,b=map(int, input().split())
    X.append([a,b])
X.sort()
ans=0
i=0
while M>0:
    if M>=X[i][1]:
        ans+=X[i][1]*X[i][0]
        M-=X[i][1]
        i+=1
    else:
        ans+=X[i][0]*M
        break
print(ans)

Buggy submission (verdict: Runtime Error):
#C - Energy Drink Collector(ABC121)
N,M=map(int, input().split())
L={}
for i in range(N):
    A,B=map(int, input().split())
    L[A]=B
X=sorted(L.keys())
i=0
ans=0
while True:
    if M>=L[X[i]]:
        M-=L[X[i]]
        ans+=X[i]*L[X[i]]
        i+=1
        if M==0:
            break
    else:
        ans+=X[i]*M
        break
print(ans)
Problem p03261 (python)

Fixed submission:
#B - Shiritori(ABC109)
N=int(input())
W=[]
s=True
for i in range(N):
    W.append(input())
if len(set(W))==N:
    for i in range(N-1):
        if W[i][-1]!=W[i+1][0]:
            print("No")
            s=False
            break   
else:
    print("No")
    s=False
if s:
    print("Yes")

Buggy submission (verdict: Runtime Error):
#B - Shiritori(ABC109)
N=int(input())
W=[]
for i in range(N):
    W.append(input())

if len(set(W))==N:
    for i in range(N-1):
        if W[i][-1]==W[i+1][0]:
            s=True
        
        else:
            print("No")
            s=False
            break   
else:
    print("No")
if s:
    print("Yes")
Problem p03543 (python)

Fixed submission:
#A-Good Integer(ABC079)
N=str(input())
if len(set(N[0:3]))==1 or len(set(N[1:4]))==1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
#A-Good Integer(ABC079)
N=input()
if N[1]==N[2]and set(N)<3:
    print("Yes")
else:
    print("No")