Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A,B,K = list(map(int,input().split()))
for i in list(range(A,B+1))[:K] + list(range(A,B+1))[(-1*K):]:
    print(i)

Fixed submission:
A,B,K = map(int,input().split())
for i in sorted(set(range(A,B+1)[:K])|set((range(A,B+1)[-1*K:]))):
    print(i)

Buggy python submission (verdict: Runtime Error):
A,B,K = list(map(int,input().split()))
for i in list(range(A,B+1))[:K] + list(range(A,B+1))[-1*K:]:
    print(i)

Fixed submission:
A,B,K = map(int,input().split())
for i in sorted(set(range(A,B+1)[:K])|set((range(A,B+1)[-1*K:]))):
    print(i)
Buggy python submission (verdict: Runtime Error):
H,W = input().split(" ")
h,w = input().spplit(" ")

print((H-h) * (W-w))

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

print((H-h)*(W-w))
Buggy python submission (verdict: Runtime Error):
X = int(input())

sft = [3,5,7]

if x in sft:
  print("YES")
else:
  print("NO")

Fixed submission:
X = int(input())

sft = [3,5,7]

if X in sft:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
x = int(input())
y = int(input())

if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

Fixed submission:
x,y = map(int,input().split())
if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

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

if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

Fixed submission:
x,y = map(int,input().split())
if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

Buggy python submission (verdict: Runtime Error):
x = int(raw_input())
y = int(raw_input())

if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

Fixed submission:
x,y = map(int,input().split())
if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
coins = [a+b,2a-1,2b-1]
print(max(coins))

Fixed submission:
a,b=map(int,input().split())
coins = [a+b,2*a-1,2*b-1]
print(max(coins))
Buggy python submission (verdict: Runtime Error):
N=int(input())
H=[int(x) for x in input().split()]
can_watch = 0
for i in range(N):
  if H[i] >= max(H[:i]):
    can_watch = can_watch + 1
  else:
    pass
print(can_watch)

Fixed submission:
N=int(input())
H=[int(x) for x in input().split()]
can_watch = 0
for i in range(N):
  if i > 0:
    if H[i] >= max(H[:i]):
      can_watch = can_watch + 1
    else:
      pass
  else:
    can_watch = can_watch + 1
print(can_watch)
Buggy python submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
l = [0] * q
r = [0] * q
for i in range(0, q):
    l[i], r[i] = map(int, input().split())
ac_index = [False] * n
for i in range(n - 1):
    if s[i] + s[i + 1] == 'AC':
        ac_index[i] = True
for i in range(0, q):
    count = 0;
    for j in range(l[i] - 1, r[i] - 1):
        if ac_index[j]:
            count += 1
    print(count)

Fixed submission:
b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print('C')
elif b == 'C':
    print('G')
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
i = a + 1 if a <= b else b + 1
count = 0
while count < k:
    i -= 1
    if a % i == 0 and b % i == 0:
        count += 1
print(i)

Fixed submission:
a,b,c = map(int,input().split())
print(c if a*c < b else b//a)
Buggy python submission (verdict: Runtime Error):
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)

Fixed submission:
n = int(input())
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)

Buggy python submission (verdict: Runtime Error):
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)

Fixed submission:
n = int(input())
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)
Buggy python submission (verdict: Runtime Error):
from fractions import gcd
from functools import reduce
input()
print(reduce(gcd,list(map(int,input().split()))))

Fixed submission:
a, b = map(int, input().split())
print(a + b if b % a == 0 else b - a)
Buggy python submission (verdict: Runtime Error):
from fraction import gcd
from functools import reduce
input()
print(reduce(gcd,list(map(int,input().split()))))

Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)

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


Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)

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

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = math.gcd(l,i)
print(i)


Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)

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

n = int(input())
print(functools.reduce(math.gcd, list(map(int, input().split()))))

Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)

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

n = int(input())
print(reduce(math.gcd, list(map(int, input().split()))))

Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)

Buggy python submission (verdict: Runtime Error):
n = int(input())
hp_list = list(map(int, input().split()))
i = min(hp_list)
while True:
    dividable = True
    for j in hp_list:
        if j % i != 0:
            dividable = False
    if dividable:
        break
    else:
        for j in range(2, i + 1):
            if i % j == 0:
                i /= j
                break
print(int(i))

Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)

Buggy python submission (verdict: Runtime Error):
n = int(input())
hp_list = list(map(int, input().split()))
i = min(hp_list)
while True:
    dividable = True
    for j in hp_list:
        if j % i != 0:
            dividable = False
    if dividable:
        break
    else:
        for j in range(2, i + 1):
            if i % j == 0:
                i /= j
                break
print(i)

Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
hp_list = list(map(int, input().split()))
i = min(hp_list)
while True:
    dividable = True
    for j in hp_list:
        if j % i != 0:
            dividable = False
    if dividable:
        break
    else:
        i -= 1
print(i)

Fixed submission:
from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)
Buggy python submission (verdict: Runtime Error):
input()
l = list(map(int, input().split())).sort(reverse = True)
print('Yes' if l[0] < sum(l[1:]) else 'No')

Fixed submission:
input()
l = list(map(int, input().split()))
l.sort(reverse = True)
print('Yes' if l[0] < sum(l[1:]) else 'No')
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
x = sorted(list(map(int, input().split())))
if n < m:
    distance = []
    for i in range(m-1):
        distance.append(x[i + 1] - x[i])
    for _ in range(n - 1):
        distance.remove(max(distance))
    print(sum(distance))
else:
    print(0)

Fixed submission:
n, m = map(int, input().split())
x = sorted(list(map(int, input().split())))
if n < m:
    distance = []
    for i in range(m-1):
        distance.append(x[i + 1] - x[i])
    distance.sort()
    print(sum(distance[0:m-n]))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
#include<stdio.h>

int main() {
	int n, h[100], i, flg, cnt, stop;
	scanf("%d", &n);
	for (i = 0; i < n; i++) scanf("%d", &h[i]);

	cnt = 0;
	while (1) {
		flg = 0;
		stop = 1;
		for (i = 0; i < n; i++) {
			if (h[i] > 0) {
				if (flg) h[i]--;
				else {
					flg = 1;
					stop = 0;
					cnt++;
					h[i]--;
				}
			}
			else flg = 0;
		}
		if (stop) break;
	}

	printf("%d", cnt);
}

Fixed submission:
def kuksan(array):
    for i in range(0, n):
        if array[i] > 0:
            left = i
            for j in range(left,n + 1):
                if array[j] <= 0:
                    right = j - 1
                    return left, right, True
    return 0,0,0

n = int(input())
h_list = list(map(int, input().split()))
cnt = 0
while True:
    h_list.append(0)
    kukan = kuksan(h_list)
    if kukan[2]:
        for i in range(kukan[0], kukan[1] + 1):
            h_list[i] -= 1
        cnt += 1
    else:
        break

print(cnt)
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input().split())
dif = list(map(lambda x: abs(T - int(x) * 0.006 - A), input().split()))
print(dif.index(min(x_list)) + 1)

Fixed submission:
N = int(input())
T, A = map(int, input().split())
dif = list(map(lambda x: abs(T - int(x) * 0.006 - A), input().split()))
print(dif.index(min(dif)) + 1)
Buggy python submission (verdict: Runtime Error):
from collections import Counter

n = int(input())
v = list(map(int, input().split()))
cnt_o = Counter(v[::2]).most_common(2)
cnt_e = Counter(v[1::2]).most_common(2)

mo = cnt_o[0][0]
me = cnt_e[0][0]
if mo == me:
    print(n - cnt_o[0][1] - cnt_e[0][1])
else:
    del1 = cnt_o[0][1] - cnt_o[1][1]
    del2 = cnt_e[0][1] - cnt_e[1][1]
    print(n - cnt_o[0][1] - cnt_e[0][1] + min(del1, del2))

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

app = {}
for i, j in zip(v[::2], v[1::2]):
    if i not in app:
        app[i] = [1, 0]
    else:
        app[i][0] += 1
    if j not in app:
        app[j] = [0, 1]
    else:
        app[j][1] += 1

max_o = [0, 0]
secmax_o = [0, 0]
max_e = [0, 0]
secmax_e = [0, 0]
for i in app:
    if app[i][0] > max_o[1]:
        secmax_o = max_o[:]
        max_o = [i, app[i][0]]
    elif app[i][0] > secmax_o[1]:
        secmax_o = [i, app[i][0]]
    if app[i][1] > max_e[1]:
        secmax_e = max_e[:]
        max_e = [i, app[i][1]]
    elif app[i][1] > secmax_e[1]:
        secmax_e = [i, app[i][1]]

if max_o[0] != max_e[0]:
    print(n - max_o[1] - max_e[1])
else:
    del0 = max_o[1] - secmax_o[1]
    del1 = max_e[1] - secmax_e[1]
    print(n + min(del0, del1) - max_o[1] - max_e[1])
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())
for i in range(a, b + 1):
    if not(a + k <= i <= b - k):
        print(i)


Fixed submission:
a, b, k = map(int, input().split())
if a + 2 * k > 1 + b:
    for i in range(a, b + 1):
        print(i)
else:
    for i in range(a, a + k):
        print(i)
    for i in range(b - k + 1, b + 1):
        print(i)
Buggy python submission (verdict: Runtime Error):
#include<stdio.h>

int main() {
	int n, Yellow_exists, i;
	char str[101];
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%c", &str[i]);
	}

	Yellow_exists = 0;
	for (i = 0; i < n; i++) {
		if (str[i] == 'Y') {
			Yellow_exists = 1;
			break;
		}
	}

	printf(Yellow_exists ? "Four" : "Three");
	return 0;
}

Fixed submission:
input()
a = input()
print("Four" if 'Y' in a else "Three")
Buggy python submission (verdict: Runtime Error):
N = input()
a = [int(input()) for _ in range(N)]
print(sum(a[::2]) - sum(a[1::2]))

Fixed submission:
N = input()
a = sorted(list(map(int, input().split())), reverse=True)
print(sum(a[::2]) - sum(a[1::2]))
Buggy python submission (verdict: Runtime Error):
#include<stdio.h>

int digit_sum(int num);

int main() {
	int n, a, b, cnt, i, temp;

	cnt = 0;
	scanf("%d%d%d", &n, &a, &b);
	for (i = 1; i <= n; i++) {
		temp = digit_sum(i);
		if (a <= temp && temp <= b) cnt += i;
	}
	printf("%d", cnt);
	return 0;
}

int digit_sum(int num) {
	if (num > 9) return num % 10 + digit_sum(num / 10);
	else return num;
}


Fixed submission:
n, a, b = map(int, input().split())
print(sum([x for x in range(1, n + 1) if a <= sum([int(c) for c in str(x)]) <= b]))
Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())
ans = 0
for i in range(A, B+1):
    ans = ans^i
print(ans)


Fixed submission:
A, B = map(int, input().split())
ans = 0
flag = False
if A%2 == 1:
    flag = True
    A += 1
diff = B-A+1
if diff%4 == 0:
    ans = 0
elif diff%4 == 1:
    ans = B
elif diff%4 == 2:
    ans = 1
else:
    ans = B^1
if flag: ans = ans^(A-1)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()
c1=c2=0
l = len(n)
c1 = n - (len([for i in l[0::2] if n == "0"])) - (len([for i in l[1::2] if n == "1"]))
c2 = n - (len([for i in l[0::2] if n == "1"])) - (len([for i in l[1::2] if n == "0"]))

print(min(c1,c2))

Fixed submission:
a,b = map(int,input().split())
if a==b:
  print(a*2)
else:
  print(max([a,b])*2-1)

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a=b:
  print(a*2)
else:
  print(1)

Fixed submission:
a,b = map(int,input().split())
if a==b:
  print(a*2)
else:
  print(max([a,b])*2-1)

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a = b:
  print(a*2)
else:
  print(max([a,b])*2-1)

Fixed submission:
a,b = map(int,input().split())
if a==b:
  print(a*2)
else:
  print(max([a,b])*2-1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
count = 1
max = l[0]
for i in range(N):
  if l[i] >= max:
   	count += 1
    max = l[i]
    
print(count)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
max = l[0]
count = 0
for i in range(n):
  if l[i] >= max:
    count += 1
    max = l[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
count = 1
max = l[0]
for i in range(N):
  if max <= l[i]:
   	count += 1
    max = l[i]
    
print(count)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
max = l[0]
count = 0
for i in range(n):
  if l[i] >= max:
    count += 1
    max = l[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
count = 1
max = l[0]
for i in range(N):
  if max <= l[i]:
   	count += 1
    max = l[i]
print(count)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
max = l[0]
count = 0
for i in range(n):
  if l[i] >= max:
    count += 1
    max = l[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
count = 1
max = l[0]
for i in range(len(l)):
  if max <= l[i]:
   	count += 1
    max = l[i]
print(count)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
max = l[0]
count = 0
for i in range(n):
  if l[i] >= max:
    count += 1
    max = l[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
count = 1
max = l[0]
for i in l:
  if max <= l[i]:
   	count += 1
    max = l[i]
print(count)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
max = l[0]
count = 0
for i in range(n):
  if l[i] >= max:
    count += 1
    max = l[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
count = 1
max = l[0]
for i in range(l):
  if max <= l[i]:
   	count += 1
    max = l[i]
  else:
print(count)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
max = l[0]
count = 0
for i in range(n):
  if l[i] >= max:
    count += 1
    max = l[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
count = 1
max = l[0]
for i in range(l):
  if max <= l[i]:
   	count += 1
    max = l[i]

print(count)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
max = l[0]
count = 0
for i in range(n):
  if l[i] >= max:
    count += 1
    max = l[i]
    
print(count)
Buggy python submission (verdict: Runtime Error):
n = input()
c1 = c2 = 0
l = len(n)
c1 = l - len([i for i in l[0::2] if i == "0"]) - len([i for i in l[1::2] if i == "1"])
c2 = l - len([i for i in l[0::2] if i == "1"]) - len([i for i in l[1::2] if i == "0"])

print(min(c1,c2))

Fixed submission:
S = input()
c1 = c2 = 0
 
N = len(S)
c1 = N - len([s for s in S[0::2] if s == "0"]) - len([s for s in S[1::2] if s == "1"])
c2 = N - len([s for s in S[0::2] if s == "1"]) - len([s for s in S[1::2] if s == "0"])
 
print(min(c1, c2))

Buggy python submission (verdict: Runtime Error):
n = input()
c1=c2=0
l = len(n)
c1 = l - len([i for i in l[0::2] if i == "0"]) - len([i for i in l[1::2] if i == "1"])
c2 = l - len([i for i in l[0::2] if i == "1"]) - len([i for i in l[1::2] if i == "0"])

print(min(c1,c2))

Fixed submission:
S = input()
c1 = c2 = 0
 
N = len(S)
c1 = N - len([s for s in S[0::2] if s == "0"]) - len([s for s in S[1::2] if s == "1"])
c2 = N - len([s for s in S[0::2] if s == "1"]) - len([s for s in S[1::2] if s == "0"])
 
print(min(c1, c2))

Buggy python submission (verdict: Runtime Error):
n = input()
c1=c2=0
l = len(n)
c1 = n - len([i for i in l[0::2] if i == "0"]) - len([i for i in l[1::2] if i == "1"])
c2 = n - len([i for i in l[0::2] if i == "1"]) - len([i for i in l[1::2] if i == "0"])

print(min(c1,c2))

Fixed submission:
S = input()
c1 = c2 = 0
 
N = len(S)
c1 = N - len([s for s in S[0::2] if s == "0"]) - len([s for s in S[1::2] if s == "1"])
c2 = N - len([s for s in S[0::2] if s == "1"]) - len([s for s in S[1::2] if s == "0"])
 
print(min(c1, c2))

Buggy python submission (verdict: Runtime Error):
n = input()
c1=c2=0
l = len(n)
c1 = n - (len([i for i in l[0::2] if i == "0"])) - (len([i for i in l[1::2] if i == "1"]))
c2 = n - (len([i for i in l[0::2] if i == "1"])) - (len([i for i in l[1::2] if i == "0"]))

print(min(c1,c2))

Fixed submission:
S = input()
c1 = c2 = 0
 
N = len(S)
c1 = N - len([s for s in S[0::2] if s == "0"]) - len([s for s in S[1::2] if s == "1"])
c2 = N - len([s for s in S[0::2] if s == "1"]) - len([s for s in S[1::2] if s == "0"])
 
print(min(c1, c2))
Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split)
h,w = map(int,input().split)

print((H-h)*(W-w))

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

print((H-h)*(W-w))
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
list = []
for i in range( min(a,b)) :
  if i == 0:
    continue
  if a%i == 0 and b%i ==0:
    list.append(i)
list.reverse()

print(list[c-1])

Fixed submission:
a,b,c = map(int,input().split())
list = []
for i in range(1,min(a,b)+1) :
  if a%i == 0 and b%i == 0:
    list.append(i)
list.reverse()
print(list[c-1])
Buggy python submission (verdict: Runtime Error):
S = input().rstrip()
s = list(S)
print(s)
N = len(S)
c = 0
if N == 1:
  print(0)
else:
  for i in range(1,N)
  	if S[i-1] == '0' and S[i] == '0':
      S[i] = 1
      c +=1
    elif S[i-1] == '1' and S[i] == '1':
      S[i] = 0
      c +=1
print(c)

Fixed submission:
S = input().rstrip()
s = list(S)
N = len(S)
c = 0
v = [None] * N
v[0] = s[0]
if N == 1:
  print(c)
else:
  for i in range(1,N):
    
    if s[i]=='0' and v[i-1] =='0':
      v[i] = '1'
      c +=1
    elif s[i] =='1' and v[i-1] == '1':
      v[i] = '0'
      c +=1
    elif s[i] =='1' and v[i-1] == '0':
      v[i] = '1'
    elif s[i] =='0' and v[i-1] == '1':
      v[i] = '0'
    

  print(c)
Buggy python submission (verdict: Runtime Error):
#マックスから引くやり方
import numpy as np
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
# 届く時間を1の位で切り上げたとき、届く時間の和
Menu = [A,B,C,D,E]
L1=[0]
L2=[]
time_max=0
extra=[]
"""
解答1
"""
for i in Menu:
    if i%10==0:
        L1.append(i)
    else:
        L2.append(i + 10 - int(i%10))
        extra.append(i%10)
tmp = 10 - min(extra)
time_max=sum(L1)+sum(L2)
print(time_max-tmp)
 
 
 

Fixed submission:
#マックスから引くやり方
import numpy as np
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
# 届く時間を1の位で切り上げたとき、届く時間の和
Menu = [A,B,C,D,E]
L1=[0]
L2=[]
time_max=0
extra=[]
"""
解答1
"""
for i in Menu:
    if i%10==0:
        L1.append(i)
    else:
        L2.append(i + 10 - int(i%10))
        extra.append(i%10)

if len(L2)>0:        
	tmp = 10 - min(extra)
	time_max=sum(L1)+sum(L2)
	print(time_max-tmp)
else: #全部10で割れる場合
  print(sum(L1))
Buggy python submission (verdict: Runtime Error):
n = input()
b = [int(x) for x in list(str(n))]

for i in b:
    if i in 9:
        print("Yes")
        break

Fixed submission:
n = int(input())

b = [int(x) for x in list(str(n))]

if b[0] == 9 or b[1] == 9:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [int(x) for x in input().split()]
M = int(input())

for i in range(M):
    x,y = map(int,input().split())
    a[0] = x
    a[1] = y
    print(sum(a))

Fixed submission:
N = int(input())
a = [int(x) for x in input().split()]
M = int(input())

for i in range(M):
    x,y = map(int,input().split())
    c = a[x-1]
    a[x-1] = y

    print(sum(a))
    a[x-1] = c
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = N*(N+1)/2
print(int(b))

Fixed submission:
N = int(input())
a = N*(N+1)/2
print(int(a))
Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    p, q = input().split()
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
	print(answer)
    

Fixed submission:
if __name__ == "__main__":
    p, q = input().split()
    p = int(p)
    q = int(q)
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
    print(answer)

Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    p, q = input().split()
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
    

Fixed submission:
if __name__ == "__main__":
    p, q = input().split()
    p = int(p)
    q = int(q)
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
    print(answer)
Buggy python submission (verdict: Runtime Error):
N = int(input())
l = list(map(int, input().split()))
counter=0
for i in range(N):
  if max(l[:i+1])==l[i]
   counter += 1
print(counter)

Fixed submission:
N = int(input())
l = list(map(int, input().split()))
counter=0
for i in range(N):
  if max(l[:i+1])==l[i]:
   counter += 1
print(counter)