Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

k,s = map(int,input().split())

cnt = 0

for i in range(k+1):
    for j in range(k+1):
        for l in range(k+1):
            if i + j + l == s:
                cnt += 1

print(cnt)


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

k,s = map(int,input().split())

ans = 0

for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if 0 <= z <= k:
            ans += 1

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

n = int(input())
s = list(input())
t = list(input())

for i in range(n):
    match = True
    for j in range(n):
        if i + j < n:
            if s[i + j] != t[j]:
                match = False
    if match:
        if i == 0:
            print(n)
        else:
            print(n + i)
        break
else:
    print(len(n * 2))


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

n = int(input())
s = list(input())
t = list(input())

for i in range(n):
    match = True
    for j in range(n):
        if i + j < n:
            if s[i + j] != t[j]:
                match = False
    if match:
        if i == 0:
            print(n)
        else:
            print(n + i)
        break
else:
    print(n * 2)
Buggy python submission (verdict: Runtime Error):
from sys import stdin
stdin = open('./input.txt')
l = stdin.readline().rstrip()
month_possible = ['01','02','03','04','05','06','07','08','09','10','11','12']
year_possible = ['00']

fo = ''.join(l[0:2])
la = ''.join(l[2:])

if 0 < int(fo) <= 12:
    if 0 < int(la) <= 12:
        print("AMBIGUOUS")
    elif 0 <= int(la) < 100:
        print("MMYY")
    else:
        print("NA")
else:
    if 0 < int(la) <= 12:
        print("YYMM")
    else:
        print("NA")


Fixed submission:
from sys import stdin
# stdin = open('./input.txt')
l = stdin.readline().rstrip()
month_possible = ['01','02','03','04','05','06','07','08','09','10','11','12']
year_possible = ['00']

fo = ''.join(l[0:2])
la = ''.join(l[2:])

if 0 < int(fo) <= 12:
    if 0 < int(la) <= 12:
        print("AMBIGUOUS")
    elif 0 <= int(la) < 100:
        print("MMYY")
    else:
        print("NA")
else:
    if 0 < int(la) <= 12:
        print("YYMM")
    else:
        print("NA")
Buggy python submission (verdict: Runtime Error):
N, K = map(int, raw_input().split())
word = raw_input().split()
newword = ""
for i in xrange(N):
  if i == K - 1:
    if word[i] == "A":
      newword += "a"
    elif word[i] == "B":
      newword += "b"
    else:
      newword += "c"
  else:
    newword += word[i]
    
print newword

Fixed submission:
N, K = map(int, raw_input().split())
word = raw_input()
newword = ""
for i in xrange(N):
  if i == K - 1:
    if word[i] == "A":
      newword += "a"
    elif word[i] == "B":
      newword += "b"
    else:
      newword += "c"
  else:
    newword += word[i]
    
print newword
Buggy python submission (verdict: Runtime Error):
N, K = map(int, raw_input().split())

prob = 0.0
potencias = [1]
i = 2
while i < 100001:
    potencias.append(i)
    i *= 2

# print potencias
for i in xrange(1, N+1):
    if i < K:
        j = 0
        while potencias[j]*i < K:
            j += 1
        p = 1.0/(N*1.0)
        p *= (0.5**j)
        prob += p
    else:
        prob += 1.0/(N*1.0)
    
print prob

Fixed submission:
N, K = map(int, raw_input().split())

prob = 0.0
potencias = [1]
i = 1
while i < 100001:
    i *= 2
    potencias.append(i)


# print potencias
for i in xrange(1, N+1):
    if i < K:
        j = 0
        while potencias[j]*i < K:
            j += 1
        p = 1.0/(N*1.0)
        p *= (0.5**j)
        prob += p
    else:
        prob += 1.0/(N*1.0)
    
print prob
Buggy python submission (verdict: Runtime Error):
r, g, b, n = map(int, raw_input().split())
count = 0
for i in xrange(3000):
	if i*r > n:
    	break
	for j in xrange(3000):
    	if i*r + j*g > n:
      		break
		if (n-i*r - j*g)% b == 0:
      		count += 1
print count

Fixed submission:
r, g, b, n = map(int, raw_input().split())
count = 0
for i in xrange(n+1):
    if i*r > n:
        break	
    for j in xrange(n+1):
        if i*r + j*g > n:
            break
        if (n- i*r - j*g) % b == 0:
      		count += 1
print count

Buggy python submission (verdict: Runtime Error):
r, g, b, n = map(int, raw_input().split())
count = 0
for i in xrange(3000):
  if i*r > n:
    break
  for j in xrange(3000):
    if i*r + j*g > n:
      break
	if (n-i*r - j*g)% b == 0:
      count += 1
print count

Fixed submission:
r, g, b, n = map(int, raw_input().split())
count = 0
for i in xrange(n+1):
    if i*r > n:
        break	
    for j in xrange(n+1):
        if i*r + j*g > n:
            break
        if (n- i*r - j*g) % b == 0:
      		count += 1
print count
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(max(a,b)+print(max(max(a,b)-1,min(a,b)))

Fixed submission:
a,b=map(int,input().split())
print(max(a,b)+max((max(a,b)-1),min(a,b)))
Buggy python submission (verdict: Runtime Error):
n=int(input())
import math
print((2*n)//math.gcd(2,n))


Fixed submission:
n=int(input())
print(2*n) if n%2 != 0 else print(n)

Buggy python submission (verdict: Runtime Error):
n=int(input())
import math
print((2*n)//math.gcd(2,n))


Fixed submission:
n=int(input())
print(2*n) if n%2 != 0 else print(n)

Buggy python submission (verdict: Runtime Error):
n=int(input())
import math
print(2*n//math.gcd(2,n))


Fixed submission:
n=int(input())
print(2*n) if n%2 != 0 else print(n)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=1
for num in range(1,n+1):
  a *= num
print(a%(10**9+7))

Fixed submission:
n = int(input())
p = 1
for i in range(1, n+1):
    p = p * i % 1000000007

print(p)
Buggy python submission (verdict: Runtime Error):
s=list(input())
a=[]
z=[]
for num in range(len(s)):
  if s[num]=='A':
    a.append(num)
  if s[num]=='Z':
    z.append(num)
print(max(z)-min(a)+1)


Fixed submission:
x = int(input())
print('ABC') if x < 1200 else print('ARC')
Buggy python submission (verdict: Runtime Error):
s=list(input())
print((s.index('z')-s.index('a'))+1)


Fixed submission:
s=input()
a=[]
z=[]
for num in range(len(s)):
  if s[num]=='A':
    a.append(num)
  if s[num]=='Z':
    z.append(num)
print(max(z)-min(a)+1)
Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
if b == 0:
    print(1)
elif a == 0:
    print(b//x)+1
else:
    print(b//x-(a-1)//x)


Fixed submission:
a,b,x=map(int,input().split())
print((b//x)-((a-1)//x))

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


Fixed submission:
a,b,x=map(int,input().split())
print((b//x)-((a-1)//x))

Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
print((b-a)//x) if (b%x != 0 and %x != 0) else print((b-a)//x+1)

Fixed submission:
a,b,x=map(int,input().split())
print((b//x)-((a-1)//x))
Buggy python submission (verdict: Runtime Error):
s=input()
c=[]
f=[]
for num in range(len(s)):
    if s[num] == 'C':
        c.append(num)
    if s[num] == 'F':
        f.append(num)
print('Yes') if min(c) < max(f) else print('No')


Fixed submission:
s=input()
c=[]
f=[]
for num in range(len(s)):
    if s[num] == 'C':
        c.append(num)
    if s[num] == 'F':
        f.append(num)
        
if 'C' in s and 'F' in s:
	print('Yes') if min(c) < max(f) else print('No')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
s=input()
for i in range(len(s)):
    if s[i] == 'B':
        s = s[:-1]
print(s)


Fixed submission:
s=input()
result=''
for i in s:
    if i != 'B':
        result += i
    else:
        result = result[:-1]
print(result)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
 
ops = []
while len(a):
  if not any(a[i] == i + 1 for i in range(len(a))):
    print(-1)
    exit()
  for i in range(reversed(len(a))):
    if a[i] == i + 1:
      ops.append(a[i])
      a.pop(i)
      break

for op in reversed(ops):
  print(op)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
 
ops = []
while len(a):
  if not any(a[i] == i + 1 for i in range(len(a))):
    print(-1)
    exit()
  for i in reversed(range(len(a))):
    if a[i] == i + 1:
      ops.append(a[i])
      a.pop(i)
      break
 
for op in reversed(ops):
  print(op)

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

ops = []
while len(a):
  if not any(a[i] == i + 1 for i in range(len(a))):
    print(-1)
    exit()
  for i in range(reversed(len(a))):
    if a[i] == i + 1:
      ops.append(a[i])
      a.pop(i)
      break

for op in reversed(ops):
  print(op)



Fixed submission:
n = int(input())
a = list(map(int, input().split()))
 
ops = []
while len(a):
  if not any(a[i] == i + 1 for i in range(len(a))):
    print(-1)
    exit()
  for i in reversed(range(len(a))):
    if a[i] == i + 1:
      ops.append(a[i])
      a.pop(i)
      break
 
for op in reversed(ops):
  print(op)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
dp = [0, abs(A[1] - A[0])]
for i in range(2, N):
  dp[i] = min(
    abs(A[i] - A[i - 1]) + dp[i - 1],
    abs(A[i] - A[i - 2]) + dp[i - 2])
print(dp[-1])


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
dp = [0] * N
dp[1] = abs(A[1] - A[0])
for i in range(2, N):
  dp[i] = min(
    abs(A[i] - A[i - 1]) + dp[i - 1],
    abs(A[i] - A[i - 2]) + dp[i - 2])
print(dp[-1])
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
count = 0
for x in range(k+1):
    if(x > s):
        break
    for y in range(k+1):
        if(x + y > s):
            break
        for z in range(k+1):
            if (x + y + z == s):
                count = count + 1
print(count)

Fixed submission:
k, s = map(int, input().split())
count = 0
for x in range(k+1):
    if(x > s):
        break
    for y in range(k+1):
        if(x + y > s):
            break
        if(s - (x + y) <= k):
            count = count + 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
count = 0
for x in range(k+1):
    if(x > s):
        continue
    for y in range(k+1):
        if(x + y > s):
            continue
        for z in range(k+1):
            if (x + y + z == s):
                count = count + 1
print(count)

Fixed submission:
k, s = map(int, input().split())
count = 0
for x in range(k+1):
    if(x > s):
        break
    for y in range(k+1):
        if(x + y > s):
            break
        if(s - (x + y) <= k):
            count = count + 1
print(count)

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):
            if (x + y + z == s):
                count = count + 1
print(count)

Fixed submission:
k, s = map(int, input().split())
count = 0
for x in range(k+1):
    if(x > s):
        break
    for y in range(k+1):
        if(x + y > s):
            break
        if(s - (x + y) <= k):
            count = count + 1
print(count)
Buggy python submission (verdict: Runtime Error):
​list1=input().split(" ")
num1=int(list1[0])
num2=int(list1[1])
list2=input()
strings=""
for i in range(num1):
	if i==num2:
		strings+=list2[i].lower()    
	else:
		strings+=list2[i]
print(strings)

Fixed submission:
list1=input().split(" ")
num1=int(list1[0])
num2=int(list1[1])
list2=input()
strings=""
for i in range(num1):
	if i==num2-1:
		strings+=list2[i].lower()    
	else:
		strings+=list2[i]
print(strings)
Buggy python submission (verdict: Runtime Error):
inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0=< former <=12 and 0=< latter <=12:
	print("AMBIGUOUS")
elif 0=< former <=12 and 12< latter:
	print("MMYY")
elif 0=< latter <=12 and 12< former:
	print("YYMM")

else:
	print("NA")

Fixed submission:
inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0< former <=12 and 0< latter <=12:
	print("AMBIGUOUS")
elif 0< former <=12 :
	print("MMYY")
elif 0< latter <=12 :
	print("YYMM")
else:
	print("NA")

Buggy python submission (verdict: Runtime Error):
inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0=< former <=12 and 0=< latter <=12:
	print("AMBIGUOUS")
elif 0=< former <=12 and 12=< latter:
	print("MMYY")
elif 0=< latter <=12 and 12=< former:
	print("YYMM")

else:
	print("NA")

Fixed submission:
inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0< former <=12 and 0< latter <=12:
	print("AMBIGUOUS")
elif 0< former <=12 :
	print("MMYY")
elif 0< latter <=12 :
	print("YYMM")
else:
	print("NA")

Buggy python submission (verdict: Runtime Error):
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0=< former <=12 and 0=< latter <=12:
	print("AMBIGUOUS")
elif 0=< former <=12 and 12=< latter:
	print("MMYY")
elif 0=< latter <=12 and 12=< former:
	print("YYMM")

else:
	print("NA")

Fixed submission:
inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0< former <=12 and 0< latter <=12:
	print("AMBIGUOUS")
elif 0< former <=12 :
	print("MMYY")
elif 0< latter <=12 :
	print("YYMM")
else:
	print("NA")
Buggy python submission (verdict: Runtime Error):
A,B,T=int().split()
print((T//A)*B)


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

print(t//a*b)

Buggy python submission (verdict: Runtime Error):
int()=A,B,T
print((T//A)*B)


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

print(t//a*b)
Buggy python submission (verdict: Runtime Error):
import sys

S = input()
mon30 = ["02","04","06","09","11"]
mon31 = ["01","03","05","07","08","10","12"]

f_yymm = 0
f_mmyy = 0

if (S[0]+S[1]) in mon30 and  int(S[2]+S[3]) <= 30:
	f_yymm = 1
elif (S[0]+S[1]) in mon31 and  int(S[2]+S[3]) <= 31:
	f_yymm = 1
if (S[2]+S[3]) in mon30 and  int(S[0]+S[1]) <= 30:
	f_mmyy = 1
elif (S[2]+S[3]) in mon31 and  int(S[0]+S[1]) <= 31:
	f_mmyy = 1
if (S[0]+S[1]) == "00" or (S[2]+S[3]) == "00":
	print("NA")
	sys.exit()

if  f_yymm == 1 and f_mmyy == 1:
	print("AMBIGUOUS")
elif f_yymm == 1:
	print("YYMM")
elif f_mmyy == 1:
	print("MMYY")
else:
	print("NA")

Fixed submission:
N,K = input().split()
S = list(input())

for i,j in enumerate(S):
	if i+1 == int(K):
		S[i] = j.lower()
print("".join(S))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()

w_min = A[1]

for i in range(w_min,0,-1):
    count = 0
    for j in A:
        if j%i != 0:
            count = count + 1
            if count > 1:
                break
    if count < 2:
        print(i)
        break
    


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

print(T//A * B)

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


for i in range(max(A),1,-1):
    l = list(map(lambda x: x % i,A))
    if l.count(0) >= len(A)-1:
        print(i)
        break


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

print(T//A * B)

Buggy python submission (verdict: Runtime Error):
from functools import reduce
import math

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

gcd = []

for i in range(len(A)):
    B = A[i]
    A.pop(i)
    gcd.extend([reduce(math.gcd,A)])
    A.insert(i,B)

print(max(gcd))


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

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

A.sort(reverse = True)
c = 0

for i in range(max(A),1,-1):
    c = 0

    for j in A:
        if j % i != 0:
            c = c + 1
            if c >= 2:
                break
    else:
        if c <= 1:
            break
print(i)


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

w_min = A[1]

for i in range(w_min,0,-1):
    count = 0
    for j in A:
        if j%i != 0:
            count = count + 1
            if count > 1:
                break
    if count < 2:
        print(i)
        break

Buggy python submission (verdict: Time Limit Exceeded):
import functools

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

l_gcd = []

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

for i,j in enumerate(A):
    B = j
    A.pop(i)
    l_gcd.extend([functools.reduce(gcd,A)])
    A.insert(i,B)

print(max(l_gcd))


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

w_min = A[1]

for i in range(w_min,0,-1):
    count = 0
    for j in A:
        if j%i != 0:
            count = count + 1
            if count > 1:
                break
    if count < 2:
        print(i)
        break

Buggy python submission (verdict: Time Limit Exceeded):
import functools

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

l_gcd = []

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

for i in range(len(A)):
    B = A[i]
    A.pop(i)
    l_gcd.extend([functools.reduce(gcd,A)])
    A.insert(i,B)

print(max(l_gcd))


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

w_min = A[1]

for i in range(w_min,0,-1):
    count = 0
    for j in A:
        if j%i != 0:
            count = count + 1
            if count > 1:
                break
    if count < 2:
        print(i)
        break

Buggy python submission (verdict: Runtime Error):
import functools
import math

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

gcd = []

for i in range(len(A)):
    B = A[i]
    A.pop(i)
    gcd.extend([functools.reduce(math.gcd,A)])
    A.insert(i,B)

print(max(gcd))


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

w_min = A[1]

for i in range(w_min,0,-1):
    count = 0
    for j in A:
        if j%i != 0:
            count = count + 1
            if count > 1:
                break
    if count < 2:
        print(i)
        break
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = list(input())


l_sum = []
r_sum = []
sum_list = []

l_c = 0
r_c = 0

for i in range(1,N):
	if S[i-1] == '#':
		l_c = l_c + 1
	l_sum.extend([l_c])
	if S[N-i] == '.':
		r_c = r_c + 1
	r_sum.insert(0,r_c)

l_sum.insert(0,0)
r_sum.extend([0])

sum_list = [x + y for (x,y) in zip(l_sum,r_sum)]
print(min(sum_list))


Fixed submission:
N = int(input())
S = list(input())

c_b = 0
c_w = S.count('.')
sum = []

for i in S:
	if i == '.':
		c_w = c_w - 1
	sum.extend([c_b+c_w])
	if i == '#':
		c_b = c_b + 1

print(min(sum))

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


l_sum = []
r_sum = []
sum_list = []

l_c = 0
r_c = 0

for i in range(1,N):
	if S[i-1] == '#':
		l_c = l_c + 1
	l_sum.extend([l_c])
	if S[N-i] == '.':
		r_c = r_c + 1
	r_sum.insert(0,r_c)

#print(l_sum)
#print(r_sum)
sum_list = [x + y for (x,y) in zip(l_sum,r_sum)]
print(min(sum_list))


Fixed submission:
N = int(input())
S = list(input())

c_b = 0
c_w = S.count('.')
sum = []

for i in S:
	if i == '.':
		c_w = c_w - 1
	sum.extend([c_b+c_w])
	if i == '#':
		c_b = c_b + 1

print(min(sum))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = list(input())
S = S + ['#']
l_sum = []

for i in range(len(S)):
    l_sum.extend([S[0:i].count('#')+S[i:len(S)].count('.')])

print(min(l_sum))


Fixed submission:
N = int(input())
S = list(input())

c_b = 0
c_w = S.count('.')
sum = []

for i in S:
	if i == '.':
		c_w = c_w - 1
	sum.extend([c_b+c_w])
	if i == '#':
		c_b = c_b + 1

print(min(sum))
Buggy python submission (verdict: Runtime Error):
import sys
import itertools

x,y,z,k = map(int,(input().split()))

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

a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

comb_a = [a[0]]
comb_b = [b[0]]
comb_c = [c[0]]
next = []
sum = []

comb = list(itertools.product(comb_a,comb_b,comb_c))
num_comb = len(comb)

#while num_comb < k*2 and num_comb < 3000:
while num_comb < 3000:


    next = []
    for i in a,b,c:
        if len(i) >= 2:
            next.append(i[0] - i[1])
        if len(i) == 1:
            next.append(10000000001)
    if min(next) != 10000000001:
        if len(a) >= 2 and min(next) == a[0] - a[1]:
            comb_a.append(a[1])
            a.pop(0)
        elif len(b) >= 2 and min(next) == b[0] - b[1]:
            comb_b.append(b[1])
            b.pop(0)
        elif len(c) >= 2 and min(next) == c[0] - c[1]:
            comb_c.append(c[1])
            c.pop(0)
    else:
        break
    comb = list(itertools.product(comb_a,comb_b,comb_c))
    num_comb = len(comb)
    
for i in comb:
    sum.append(i[0]+i[1]+i[2])
sum.sort(reverse=True)
for i in range(k):
    print(sum[i])


Fixed submission:
a= int(input())
b= int(input())
c= int(input())
d= int(input())
e= int(input())
k= int(input())

result = 0
if e - a <= k:
    print('Yay!')
elif e - a > k:
    print(':(')
Buggy python submission (verdict: Runtime Error):
count = 0
l = []
for i in range(5):
    A = input()
    if int(A[-1]) != 0:
        l.append(int(A[-1]))
        A = round(int(A)+5,-1)
    count = count + int(A)
print(count+min(l)-10)


Fixed submission:
count = 0
l = []
for i in range(5):
    A = input()
    if int(A[-1]) != 0:
        l.append(int(A[-1]))
        A = round(int(A)+5,-1)
    count = count + int(A)
print(count+(-10 + min(l) if l else 0 ))

Buggy python submission (verdict: Runtime Error):
count = 0
l = []
for i in range(5):
    A = input()
    if int(A[-1]) != 0:
        l.append(int(A[-1]))
        A = round(int(A)+5,-1)
    count = count + int(A)
print(count+min(l)-10)


Fixed submission:
count = 0
l = []
for i in range(5):
    A = input()
    if int(A[-1]) != 0:
        l.append(int(A[-1]))
        A = round(int(A)+5,-1)
    count = count + int(A)
print(count+(-10 + min(l) if l else 0 ))
Buggy python submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
t=[0]*(N+1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
    l, r = map(int, input().split())
    print(t[r-1] - t[l-1])  

Fixed submission:
b = input()

if b == 'A':
    print('T')
if b == 'C':
    print('G')
if b == 'G':
    print('C')
if b == 'T':
    print('A')

Buggy python submission (verdict: Runtime Error):
N,Q = input().split()
Q = int(Q)
S = input()

list1 = []

for i in range(Q):
    l,r = map(int,input().split())
    l = l - 1
    list1.append(S[l:r].count('AC'))

for i in list1:
    print(i)

Fixed submission:
b = input()

if b == 'A':
    print('T')
if b == 'C':
    print('G')
if b == 'G':
    print('C')
if b == 'T':
    print('A')