Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = input().split()
l=0
for i in range(N):
  if H[i] >= H[i+1]:
      t_l = t_l + 1
  else:
    if l < t_l:
      l = t_l
    t_l=0
print(l)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
l=0
t_l = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    t_l = t_l + 1
    if l < t_l:
      l = t_l
  else:
    t_l=0
print(l)

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = input().split()
l=0
for i in range(N):
  t_l=0
  for j in range(i, N-1):
    if H[j] >= H[j+1]:
      t_l = t_l + 1
    else:
      break
  if l < t_l:
    l = t_l
  i=j+1
print(l)


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
l=0
t_l = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    t_l = t_l + 1
    if l < t_l:
      l = t_l
  else:
    t_l=0
print(l)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = [int(s) for s in input().split()]
l=0
for i in range(N):
  t_l=0
  for j in range(i, N-1):
    if H[j] >= H[j+1]:
      t_l = t_l + 1
    else:
      break
  if l < t_l:
    l = t_l
  i=i+t_l+1
print(l)


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
l=0
t_l = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    t_l = t_l + 1
    if l < t_l:
      l = t_l
  else:
    t_l=0
print(l)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = [int(s) for s in input().split()]
l=0
for i in range(N):
  t_l=0
  for j in range(i, N-1):
    if H[j] >= H[j+1]:
      t_l = t_l + 1
    else:
      break
  if l < t_l:
    l = t_l
  i=i+t_l
print(l)


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
l=0
t_l = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    t_l = t_l + 1
    if l < t_l:
      l = t_l
  else:
    t_l=0
print(l)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = [int(s) for s in input().split()]
l=0
for i in range(N):
  t_l=0
  for j in range(i, N-1):
    if H[j] >= H[j+1]:
      t_l = t_l + 1
    else:
      break
  if l < t_l:
    l = t_l
print(l)


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
l=0
t_l = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    t_l = t_l + 1
    if l < t_l:
      l = t_l
  else:
    t_l=0
print(l)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N = int(input())

for i in range(N):
	t, x, y = map(int, input().split(" "))
	if x > 0 and t >= x:
		t = t - x
		x = 0
		for j in range(t):
			if y >= 0:
				y -=1               
			else:
				y +=1
	elif x < 0 and t >= x * (-1):
		t = t -(-1 * x)
		x = 0      
		for j in range(t):
			if y >= 0:
				y -=1               
			else:
				y +=1
	else:
		for j in range(t):
			if y >= 0:
				y -=1               
			else:
				y +=1
	if x != 0 or y !=0:
		print("No")
		sys.exit()
print("Yes")

Fixed submission:
import sys
N = int(input())

for i in range(N):
	t, x, y = map(int, input().split(" "))
	t = t - x - y
	if t % 2 != 0 or t < 0:
		print("No")
		sys.exit()

print("Yes")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split(" "))
ans = upper((a + b)/2)
print(ans)

Fixed submission:
import math

a, b = map(int, input().split(" "))
ans = math.ceil((a + b)/2)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split(" "))
arr = list(map(int, input().split(" ")))
new_arr = set(arr)

ans_date = []
for i in new_arr:
  date = []
  num_count = arr.count(i)
  num = i
  date.append(num_count)
  date.append(num)
  ans_date.append(date)
ans_date.sort()

t = len(ans_date)
x = t - k
if x <= 0:
  print(0)
  exit()
ans = 0
for l in range(x):
  ans += ans_date[l][0]
print(ans)

Fixed submission:
from collections import Counter

n, k = map(int, input().split(" "))
As = list(map(int, input().split(" ")))

c = Counter(As)
# print(c)
common = c.most_common(k)
# print(common)

common_sum = sum([item[1] for item in common])
print(n - common_sum)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split(" "))
arr = list(map(int, input().split(" ")))
new_arr = set(arr)
# print(arr)
# print(new_arr)

ans_date = []
for i in new_arr:
  date = []
  num_count = arr.count(i)
  num = i
  date.append(num_count)
  date.append(num)
  ans_date.append(date)
# print(ans_date)
ans_date.sort()
# print(ans_date)

t = len(ans_date)
x = t - k

ans = 0
for l in range(x):
  ans += ans_date[l][0]
print(ans)

Fixed submission:
from collections import Counter

n, k = map(int, input().split(" "))
As = list(map(int, input().split(" ")))

c = Counter(As)
# print(c)
common = c.most_common(k)
# print(common)

common_sum = sum([item[1] for item in common])
print(n - common_sum)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input()) * 3

arr = list(map(int, input().split(" ")))
arr.sort()

# print(arr)
total = 0
while arr != []:
  arr.pop(0)
  arr.pop(-1)
  total += arr.pop(-1)

print(total)

Fixed submission:
n = int(input())
arr = list(map(int, input().split(" ")))
arr.sort()
# print(arr)

new_arr = arr[n::2]
print(sum(new_arr))
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split(" "))
count = 0

for x in range(K + 1):
  for y in range(K + 1):
    for z in range(K + 1):
      ans = x + y + z
      if S == ans:
        count += 1
print(count)

Fixed submission:
K, S = map(int, input().split(" "))
count = 0

for x in range(K + 1):
  for y in range(K + 1):
    if S - x - y >= 0 and S - x - y <= K:
      count += 1
     
print(count)
Buggy python submission (verdict: Runtime Error):
N, L = map(int, input().split(" "))

words = []
for i in range(L):
  word = input()
  words.append(word)

words.sort()
print("".join(words))

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

words = []
for i in range(N):
  word = input()
  words.append(word)

words.sort()
print("".join(words))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 0
for i in range(n-1):
    ans += i + 1
if n == 1:
    ans = 0
print(ans)

Fixed submission:
n = int(input())
ans = 0
ans = (1 + n-1)*(n-1)//2
if n == 1:
    ans = 0
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
b = input()
a = [[int(x) for x in input().split()] for _ in range(q)]
ans=[0]
for j in range(len(b)-1):
        if b[j:j+2] == "AC":
            ans.append(1)
        else:
            ans.append(0)
for i in a:
    print(sum(ans[i[0]:i[1]]))

Fixed submission:
n, q = map(int, input().split())
s = input()
t = [[int(x) for x in input().split()] for _ in range(q)]
add_list = [0]
for i in range(len(s)-1):
    if s[i:i+2] == "AC":
        add_list.append(add_list[i]+1)
    else:
        add_list.append(add_list[i])
for i in t:
    ans = add_list[i[1]-1] - add_list[i[0]-1]
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
b = input()
a = [[int(x) for x in input().split()] for _ in range(q)]
ans=[0]
for j in range(len(b)-1):
        if b[j] == "A" and b[j+1] == "C":
            ans.append(1)
        else:
            ans.append(0)
for i in a:
    print(sum(ans[i[0]:i[1]]))

Fixed submission:
n, q = map(int, input().split())
s = input()
t = [[int(x) for x in input().split()] for _ in range(q)]
add_list = [0]
for i in range(len(s)-1):
    if s[i:i+2] == "AC":
        add_list.append(add_list[i]+1)
    else:
        add_list.append(add_list[i])
for i in t:
    ans = add_list[i[1]-1] - add_list[i[0]-1]
    print(ans)

Buggy python submission (verdict: Runtime Error):
b = "ACACTACG"
n, q = map(int, input().split())
b = input()
a = [[int(x) for x in input().split()] for _ in range(q)]
for j in range(len(b)-1):
        if b[j] == "A" and b[j+1] == "C":
            ans.append(1)
        else:
            ans.append(0)
for i in a:
    print(sum(ans[i[0]:i[1]]))


Fixed submission:
n, q = map(int, input().split())
s = input()
t = [[int(x) for x in input().split()] for _ in range(q)]
add_list = [0]
for i in range(len(s)-1):
    if s[i:i+2] == "AC":
        add_list.append(add_list[i]+1)
    else:
        add_list.append(add_list[i])
for i in t:
    ans = add_list[i[1]-1] - add_list[i[0]-1]
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
b = input()
a = [[int(x) for x in input().split()] for _ in range(q)]
for i in a:
    ans = 0
    s = b[i[0]-1:i[1]]
    for j in range(len(s)-1):
        if s[j] == "A" and s[j+1] == "C":
            ans += 1
    print(ans)

Fixed submission:
n, q = map(int, input().split())
s = input()
t = [[int(x) for x in input().split()] for _ in range(q)]
add_list = [0]
for i in range(len(s)-1):
    if s[i:i+2] == "AC":
        add_list.append(add_list[i]+1)
    else:
        add_list.append(add_list[i])
for i in t:
    ans = add_list[i[1]-1] - add_list[i[0]-1]
    print(ans)
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
x = [int(i) for i in input().split()]
s = math.gcd(x[0],x[1])
for i in x:
    s = math.gcd(s,i)

print(s)

Fixed submission:
import math
n = int(input())
l = [int(i) for i in input().split()]

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義
s = gcd(l[0],l[1])
for i in l:
    s = gcd(s,i)
   

print(s)

Buggy python submission (verdict: Runtime Error):
n = map(int, input().split())
x = list(map(int, input().split()))
s = math.gcd(x[0],x[1])
for i in x:
    s = math.gcd(s,i)

print(s)

Fixed submission:
import math
n = int(input())
l = [int(i) for i in input().split()]

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義
s = gcd(l[0],l[1])
for i in l:
    s = gcd(s,i)
   

print(s)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
n = map(int, input().split())
x = list(map(int, input().split()))
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
print(gcd_list(x))

Fixed submission:
import math
n = int(input())
l = [int(i) for i in input().split()]

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義
s = gcd(l[0],l[1])
for i in l:
    s = gcd(s,i)
   

print(s)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
n = map(int, input().split())
x = list(map(int, input().split()))
def gcd(*numbers):
    return reduce(math.gcd, numbers)
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
print(gcd_list(x))

Fixed submission:
import math
n = int(input())
l = [int(i) for i in input().split()]

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義
s = gcd(l[0],l[1])
for i in l:
    s = gcd(s,i)
   

print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = list(map(int, input().split()))
nums.sort()
if nums[n] < sum(nums[:n]):
    print("Yes")
else:
    print("No")

Fixed submission:
n = int(input())
nums = list(map(int, input().split()))
nums.sort()
if nums[n-1] < sum(nums[:n-1]):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
#115-C
n,k = (int(i) for i in input().split())
t = [int(input()) for i in range(n)] 
#t = [10,15,11,14,12]
t = sorted(t)
min = float('inf')
for i in range(n-k):
    s = t[i+k-1]-t[i]
    if s < min:

print(min)
#print(t)

Fixed submission:
#115-C
n,k = (int(i) for i in input().split())
t = [int(input()) for i in range(n)] 
#t = [10,15,11,14,12]
t = sorted(t)
min = t[k-1]-t[0]
for i in range(n-k+1):
    s = t[i+k-1]-t[i]
    if s < min:
        min = s

print(min)
#print(t)

Buggy python submission (verdict: Runtime Error):
n,k = (int(i) for i in input().split())
t = [int(input()) for i in range(n)] 
t = [10,15,11,14,12]
t = sorted(t)
min = float('inf')
for i in range(n-k):
    s = t[i+k-1]-t[i]
    if s < min:

print(min)
#print(t)
    

Fixed submission:
#115-C
n,k = (int(i) for i in input().split())
t = [int(input()) for i in range(n)] 
#t = [10,15,11,14,12]
t = sorted(t)
min = t[k-1]-t[0]
for i in range(n-k+1):
    s = t[i+k-1]-t[i]
    if s < min:
        min = s

print(min)
#print(t)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
ans=0
for i in range(0,len(s)):
    a=s[i:]
    b=s[:i]
    ss=a+b
    print(ss)
    if ss == t:
        ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")

Fixed submission:
li = list(map(int,input().split()))
li.sort()
#li
print(li[2]-li[1]+li[1]-li[0])
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
l = [int(input()) for _ in range(a)]
flag = True
l = sorted(l)
max_T = 10**18
def ok(k):
    s = k
    for i in l:
        hp = i - c * k
        if hp > 0:
            s -= -(-hp // (b - c))
        if s < 0:
            return False
    return True
def binary_search(l,r):
    mid = (l + r) // 2
    if l == r:
        return l
    elif ok(mid):
        return bbb(l,mid)
    else:
        if mid == l:
            mid += 1
            
        return bbb(mid,r)
ans =binary_search(0,max_T)
print(ans) 

Fixed submission:
a,b,c = map(int, input().split())
l = [int(input()) for _ in range(a)]
flag = True
l = sorted(l)
max_T = 10**18
def ok(k):
    s = k
    for i in l:
        hp = i - c * k
        if hp > 0:
            s -= -(-hp // (b - c))
        if s < 0:
            return False
    return True
def binary_search(l,r):
    mid = (l + r) // 2
    if l == r:
        return l
    elif ok(mid):
        return binary_search(l,mid)
    else:
        if mid == l:
            mid += 1
            
        return binary_search(mid,r)
ans = binary_search(0,max_T)
print(ans)

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
l = [int(input()) for _ in range(a)]
flag = True
l = sorted(l)
max_T = 10**18
def ok(k):
    s = k
    for i in l:
        hp = i - c * k
        if hp > 0:
            s -= -(-hp // (b - c))
        if s < 0:
            return False
    return True
def binary_search(l,r):
    mid = (l + r) // 2
    if l == r:
        return l
    elif ok(mid):
        return bbb(l,mid)
    else:
        if mid == l:
            mid += 1
            
        return bbb(mid,r)
binary_search(0,max_T)

Fixed submission:
a,b,c = map(int, input().split())
l = [int(input()) for _ in range(a)]
flag = True
l = sorted(l)
max_T = 10**18
def ok(k):
    s = k
    for i in l:
        hp = i - c * k
        if hp > 0:
            s -= -(-hp // (b - c))
        if s < 0:
            return False
    return True
def binary_search(l,r):
    mid = (l + r) // 2
    if l == r:
        return l
    elif ok(mid):
        return binary_search(l,mid)
    else:
        if mid == l:
            mid += 1
            
        return binary_search(mid,r)
ans = binary_search(0,max_T)
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import Counter

N = int(input())
points = []
for _ in range(N):
    x, y = [int(i) for i in input().split()]
    points.append([x, y])

diffs = []
for i in range(N):
    for j in range(N):
        if i == j:
            pass
        else:
            x = points[i][0] - points[j][0]
            y = points[i][1] - points[j][1]
            diffs.append("{}_{}".format(x, y))

c = Counter(diffs).most_common(1)[0][1]
print(N-c)


Fixed submission:
from collections import Counter


def main():
    N = int(input())
    points = []
    for _ in range(N):
        x, y = [int(i) for i in input().split()]
        points.append([x, y])

    diffs = []
    if N == 1:
        print(1)
        return

    for i in range(N):
        for j in range(N):
            if i == j:
                pass
            else:
                x = points[i][0] - points[j][0]
                y = points[i][1] - points[j][1]
                diffs.append("{}_{}".format(x, y))

    c = Counter(diffs).most_common(1)[0][1]
    print(N-c)


main()
Buggy python submission (verdict: Runtime Error):
def m():
    N, M = [int(i) for i in input().split()]
    cards = sorted([int(i) for i in input().split()])
    manups = []
    for _ in range(M):
        b, c = [int(i) for i in input().split()]
        # c is number, b is max
        manups.append((c, b))
    manups.sort(reverse=True)

    cursor = 0
    for manup in manups:
        sub = manup[0]
        count = manup[1]
        for c in range(1, count+1):
            if cards[cursor] <= sub:
                cards[cursor] = sub
            else:
                break
                return(sum(cards))

            cursor += 1
    return(sum(cards))


if __name__ == '__main__':
    print(m())


Fixed submission:
def m():
    N, M = [int(i) for i in input().split()]
    cards = sorted([int(i) for i in input().split()])
    manups = []
    for _ in range(M):
        b, c = [int(i) for i in input().split()]
        # c is number, b is max
        manups.append((c, b))
    manups.sort(reverse=True)

    cursor = 0
    for manup in manups:
        sub = manup[0]
        count = manup[1]
        for c in range(1, count+1):
            if cursor == N:
                break
                return(sum(cards))

            if cards[cursor] <= sub:
                cards[cursor] = sub
            else:
                break
                return(sum(cards))

            cursor += 1
    return(sum(cards))


if __name__ == '__main__':
    print(m())
Buggy python submission (verdict: Runtime Error):
N = int(input())

BLACK = -1
GRAY = 0
WHITE = 1
nodes = [GRAY] * N
nodes[0] = BLACK
neighbors = [[] for _ in range(N)]

for n in range(N-1):
    u, v, w = [int(i) for i in input().split()]
    neighbors[u-1].append((v-1, w))
    neighbors[v-1].append((u-1, w))

for u in range(N):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[u] == GRAY and nodes[v] == GRAY:
            next
        if nodes[u] == GRAY:
            if w % 2 == 0:
                nodes[u] = nodes[v]
            else:
                nodes[u] = -nodes[v]
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]

for u in range(N):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[u] == GRAY and nodes[v] == GRAY:
            next
        if nodes[u] == GRAY:
            if w % 2 == 0:
                nodes[u] = nodes[v]
            else:
                nodes[u] = -nodes[v]
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]

for u in range(N):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[u] == GRAY and nodes[v] == GRAY:
            next
        if nodes[u] == GRAY:
            if w % 2 == 0:
                nodes[u] = nodes[v]
            else:
                nodes[u] = -nodes[v]
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]

for n in nodes:
    if n == BLACK:
        print(0)
    else:
        print(1)


Fixed submission:
n, k = [int(i) for i in input().split()]
s = input()

a = s[:k-1]
c = s[k-1]
b = s[k:]

if c == 'A':
    print(a + 'a' + b)
elif c == 'B':
    print(a + 'b' + b)
else:
    print(a + 'c' + b)
Buggy python submission (verdict: Runtime Error):
N = int(input())

BLACK = -1
GRAY = 0
WHITE = 1
nodes = [GRAY] * N
nodes[0] = BLACK
neighbors = [[] for _ in range(N)]

for n in range(N-1):
    u, v, w = [int(i) for i in input().split()]
    neighbors[u-1].append((v-1, w))
    neighbors[v-1].append((u-1, w))


def dfs(u):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]
            dfs(v)


dfs(0)

for n in nodes:
    if n == BLACK:
        print(0)
    else:
        print(1)


Fixed submission:
from queue import Queue

N = int(input())

BLACK = -1
GRAY = 0
WHITE = 1
nodes = [GRAY] * N
nodes[0] = BLACK
neighbors = [[] for _ in range(N)]

for n in range(N-1):
    u, v, w = [int(i) for i in input().split()]
    neighbors[u-1].append((v-1, w))
    neighbors[v-1].append((u-1, w))


def bfs():
    q = Queue()
    q.put(0)
    while not q.empty():
        u = q.get()

        neiss = neighbors[u]
        for neis in neiss:
            v, w = neis
            if nodes[v] == GRAY:
                if w % 2 == 0:
                    nodes[v] = nodes[u]
                else:
                    nodes[v] = -nodes[u]
                q.put(v)


bfs()

for n in nodes:
    if n == BLACK:
        print(0)
    else:
        print(1)

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

BLACK = -1
GRAY = 0
WHITE = 1
nodes = [GRAY] * N
nodes[0] = BLACK
neighbors = [[] for _ in range(N)]

for n in range(N-1):
    u, v, w = [int(i) for i in input().split()]
    neighbors[u-1].append((v-1, w))
    neighbors[v-1].append((u-1, w))


def dfs(u):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]
            dfs(v)


dfs(0)

for n in nodes:
    if n == BLACK:
        print(0)
    else:
        print(1)


Fixed submission:
from queue import Queue

N = int(input())

BLACK = -1
GRAY = 0
WHITE = 1
nodes = [GRAY] * N
nodes[0] = BLACK
neighbors = [[] for _ in range(N)]

for n in range(N-1):
    u, v, w = [int(i) for i in input().split()]
    neighbors[u-1].append((v-1, w))
    neighbors[v-1].append((u-1, w))


def bfs():
    q = Queue()
    q.put(0)
    while not q.empty():
        u = q.get()

        neiss = neighbors[u]
        for neis in neiss:
            v, w = neis
            if nodes[v] == GRAY:
                if w % 2 == 0:
                    nodes[v] = nodes[u]
                else:
                    nodes[v] = -nodes[u]
                q.put(v)


bfs()

for n in nodes:
    if n == BLACK:
        print(0)
    else:
        print(1)
Buggy python submission (verdict: Runtime Error):
A = []
for _ in range(5):
    A.append(int(input())
ans = sum(A)
mod = [i % 10 for i in A]
ans = ans - 10 + min(mod)
print(ans)

Fixed submission:
A = []
for _ in range(5):
    A.append(int(input()))
ans = sum([-10 * (-i//10) for i in A])
ans -= max([(10 - (i % 10)) % 10 for i in A])
print(ans)
Buggy python submission (verdict: Runtime Error):
N, K = [int(i) for i in input()]
print(0) if N % K == 0 else print(1)

Fixed submission:
N, K = [int(i) for i in input().split()]
print(0) if N % K == 0 else print(1)