Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
H, W=map(int,input().strip().split(' '))

def w_f():
    cost=[]
    for i in range(10):
        cost.append(list(map(int,input().strip().split(' '))))

    for k in range(10):
        for i in range(10):
            for j in range(10):
                cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
    rerurn cost
    
d=w_f()
ans=0
for i in range(H):
    a=list(map(int,input().strip().split(' ')))
    for j in a:
        if j!=-1:
            ans+=cost[j][1]
print(ans)



Fixed submission:
H, W=map(int,input().strip().split(' '))

cost=[]
for i in range(10):
    cost.append(list(map(int,input().strip().split(' '))))

for k in range(10):
    for i in range(10):
        for j in range(10):
            cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
ans=0
for i in range(H):
    a=list(map(int,input().strip().split(' ')))
    for j in a:
        if j!=-1:
            ans+=cost[j][1]
print(ans)

Buggy python submission (verdict: Runtime Error):
H, W=map(int,input().strip().split(' '))

V=10
E=45
inf=10**9

def w_f():
    cost=[]
    for i in range(10):
        cost.append(list(map(int,input().strip().split(' '))))

    for i in range(V):
        for j in range(V):
            for k in range(V):
                cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
    return cost


d=w_f()

ans=0
for i in range(H):
    a=list(map(int,input().strip().split(' ')))
    for j in a:
        if j!==-1:
            ans+=d[j][1]

print(ans)



Fixed submission:
H, W=map(int,input().strip().split(' '))

cost=[]
for i in range(10):
    cost.append(list(map(int,input().strip().split(' '))))

for k in range(10):
    for i in range(10):
        for j in range(10):
            cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
ans=0
for i in range(H):
    a=list(map(int,input().strip().split(' ')))
    for j in a:
        if j!=-1:
            ans+=cost[j][1]
print(ans)

Buggy python submission (verdict: Runtime Error):
H, W=map(int,input().strip().split(' '))

V=10
E=45
inf=10**9

def w_f():
    for i in range(10):
        c=list(map(int,input().strip().split(' ')))
        for j in range(10):
            cost[i][j]=c[j]

    for i in range(V):
        for j in range(V):
            for k in range(V):
                cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
    return cost


d=w_f()

ans=0
for i in range(H):
    a=list(map(int,input().strip().split(' ')))
    for j in range(W):
        if a[j]!=-1:
            ans+=d[a[j]][1]

print(ans)

Fixed submission:
H, W=map(int,input().strip().split(' '))

cost=[]
for i in range(10):
    cost.append(list(map(int,input().strip().split(' '))))

for k in range(10):
    for i in range(10):
        for j in range(10):
            cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
ans=0
for i in range(H):
    a=list(map(int,input().strip().split(' ')))
    for j in a:
        if j!=-1:
            ans+=cost[j][1]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input().strip())
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)
ans=0
for i in range(len(a)):
    for j in range(len(b)):
        if a[i]>b[j]:
            break
        for k in range(len(c)):
#            print(a[i],b[j],c[k])
            if a[i]>=b[j] or b[j]>=c[k]:
                break
            else:
#                if ans==0:
                ans+=1
#                print(a[i],b[j],c[k])
#                    at=a[i]
#                    bt=b[j]
#                    ct=c[k]
#                    print(at,bt,ct)
#                elif at!=a[i] or bt!=b[j] or ct!=c[k]:
#                    ans+=1
#                    at=a[i]
#                    bt=b[j]
#                    ct=c[k]
#                    print(at,bt,ct)
print(ans)

Fixed submission:
import bisect
N=int(input().strip())
a=list(map(int, input().split()))
b=list(map(int, input().split()))
c=list(map(int, input().split()))
a.sort()
#b.sort(reverse=True)
c.sort()
ans=0
#for i in range(len(b)):
#    la=bisect.bisect_left(a, b[i])
#    ra=bisect.bisect_right(c, b[i])
#    ans+=la*(len(c)-ra)
#    print(la,(len(c)-ra))


for i in range(len(b)):
    la=bisect.bisect_left(a, b[i])
    ra=bisect.bisect_right(c, b[i])
    #print(la*(len(c)-ra))
    ans+=la*(len(c)-ra)
#print(ans)
#la=bisect.bisect_left(a, 8)
#ra=bisect.bisect_right(a, 8)
#print(la,len(a)-ra)

print(ans)
Buggy python submission (verdict: Runtime Error):
sd = input()
T = input()

for i in range(len(sd)-len(T),-1,-1):
#    print(i)
    st=sd[i:len(T)+i]
#    print(sd[i:len(T)+i])
    fl=True
    for j in range(len(T)):
        if st[j]!='?':
            if st[j]!=T[j]:
                fl=False
    if fl:
        s=sd[:i]+T+sd[len(T)+i:]
        for k in range(len(s)):
            if s[k]=='?':
                s=s[:k]+'a'+s[k+1:]
        break
if fl:
    print(s)
else:
    print('UNRESTORABLE')

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

if len(sd)<len(T):
    fl=False
else:
    for i in range(len(sd)-len(T),-1,-1):
    #    print(i)
        st=sd[i:len(T)+i]
    #    print(sd[i:len(T)+i])
        fl=True
        for j in range(len(T)):
            if st[j]!='?':
                if st[j]!=T[j]:
                    fl=False
        if fl:
            s=sd[:i]+T+sd[len(T)+i:]
            for k in range(len(s)):
                if s[k]=='?':
                    s=s[:k]+'a'+s[k+1:]
            break
if fl:
    print(s)
else:
    print('UNRESTORABLE')
Buggy python submission (verdict: Runtime Error):
A, B, C, D, E, F=map(int, input().split())
for i in range(31):
    w=100*A*i
    s=0
    if s+w>F:
        break
    for j in range(31):
        w=100*A*i+100*B*j
        s=0
        if s+w>F:
            break
        for k in range(3001):
            w=100*A*i+100*B*j
            s=C*k
            if s+w>F:
                break
            for l in range(3001):
                w=100*A*i+100*B*j
                s=C*k+D*l
                if s+w>F:
                    break
                if w!=0 and s*(100+E)<=(s+w)*E and sans*(s+w)<=s*(sans+wans) and w+s<=F:
                    sans=s
                    wans=w
                #print(sans,sans+wans)
print(sans+wans,sans)

Fixed submission:
A, B, C, D, E, F=map(int, input().split())
wans=0
sans=0
for i in range(31):
    w=100*A*i
    s=0
    if s+w>F:
        break
    for j in range(31):
        w=100*A*i+100*B*j
        s=0
        if s+w>F:
            break
        for k in range(3001):
            w=100*A*i+100*B*j
            s=C*k
            if s+w>F:
                break
            for l in range(3001):
                w=100*A*i+100*B*j
                s=C*k+D*l
                if s+w>F:
                    break
                if w!=0 and s*(100+E)<=(s+w)*E and sans*(s+w)<=s*(sans+wans) and w+s<=F:
                    sans=s
                    wans=w
                #print(sans,sans+wans)
print(sans+wans,sans)
Buggy python submission (verdict: Runtime Error):
a=[0]*1000000001
N = int(input())
for i in range(N):
    a[int(input().strip())]+=1
for i in range(len(a)):
    a[i]=a[i]%2
print(sum(a))

Fixed submission:
d={}
N = int(input())
    
for i in range(N):
    b=int(input().strip())
    if b in d:
        d.pop(b)
    else:
        d[b]=-1
print(len(d))

Buggy python submission (verdict: Time Limit Exceeded):
def ind(l, x):
    if x in l:
        return l.index(x)
    else:
        return False

a=[]
N = int(input())
for i in range(N):
    nu=int(input().strip())
    if nu in a:
        ind=a.index(nu)
        a=a[:ind]+a[ind+1:]
    else:
        a.append(nu)
#    print(a)
    


print(len(a))

Fixed submission:
d={}
N = int(input())
    
for i in range(N):
    b=int(input().strip())
    if b in d:
        d.pop(b)
    else:
        d[b]=-1
print(len(d))
Buggy python submission (verdict: Runtime Error):
a=[]
N = int(input())
for i in range(N):
    a.append(int(input().strip()))


def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

for i in range(len(a)-1):
    gcd(a[i],a[i+1])
    lcm=(a[i]*a[i+1])//gcd(a[i],a[i+1])

print(lcm)

Fixed submission:
a=[]
N = int(input())
for i in range(N):
    a.append(int(input().strip()))


def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

if N!=1:
    for i in range(len(a)-1):
        pr=a[i]*a[i+1]
        lcm=pr//gcd(a[i],a[i+1])
        a[i+1]=lcm
else:
    lcm=a[0]

print(lcm)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
graph=[[0]*(N+1) for i in range(N+1)]
for i in range(M):
    a, b = map(int, input().split())
    graph[a][b]=1
fl=False
for i in range(N):
    if graph[1][i]==1 and graph[i][N]==1:
        fl=True
if fl:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Fixed submission:
N, M = map(int, input().split())
l1=[False]*(N+1)
l2=[False]*(N+1)


for i in range(M):
    a, b = map(int, input().split())
    if a==1:
        l1[b]=True
    elif b==N:
        l2[a]=True
        
fl=False
for i in range(N):
    if l1[i] and l2[i]:
        fl=True
    
if fl:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input().strip())
a=list(map(int, input().split()))
b=[]
for i in range(n):
    b.append(a[i])
    b=b[::-1]
print(' '.join(map(str, b)))

Fixed submission:
from collections import deque
n=int(input().strip())
a=list(map(int, input().split()))
b = deque()
for i in range(n):
    if i%2==0:
        b.append(a[i])
    else:
        b.appendleft(a[i])
b=list(b)
if n%2==1:
    b=b[::-1]
print(' '.join(map(str, b)))
Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())
for i in range(int(math.sqrt(n)),n+1,1):
    if n%i==0:
        break
print(len(str(i)))


Fixed submission:
import math
n = int(input())
for i in range(int(math.sqrt(n)),0,-1):
    if n%i==0:
        a=n//i
#        print(i)
        print(max(len(str(i)),len(str(a))))
        break

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())
for i in range(int(math.sqrt(n)),n+1,1):
    if n%i==0:
        i=str(i)
#        print(i)
        print(len(i))
        break

Fixed submission:
import math
n = int(input())
for i in range(int(math.sqrt(n)),0,-1):
    if n%i==0:
        a=n//i
#        print(i)
        print(max(len(str(i)),len(str(a))))
        break
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
x=[]
for i in range(a, b):
    for j in range(i+1, b+1):
        x.append((i*j)%2019)
print(min(x))

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if b-a>=673:
    print(0)
else:
    x=[]
    for i in range(a, b):
        for j in range(i+1, b+1):
            x.append((i*j)%2019)
    print(min(x))

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
mod = 2020
for i in range(a, b):
    for j in range(i+1, b+1):
        if i*j%2019 < mod:
            mod = i*j%2019
print(mod)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if b-a>=673:
    print(0)
else:
    x=[]
    for i in range(a, b):
        for j in range(i+1, b+1):
            x.append((i*j)%2019)
    print(min(x))
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int,input().split())

if A*N<B:
    ans=a*N
else:
    ans=B

print(ans)


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

if A*N<B:
    ans=A*N
else:
    ans=B

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
L,R=map(int,input().split())
x=[]

for i in range(L,R):
    for j in range(i+1,R+1):
        x.append((i*j)%2019)

print(min(x))


Fixed submission:
L,R=map(int,input().split())
if R-L>=673:
    print(0)
else:
    x=[]

    for i in range(L,R):
        for j in range(i+1,R+1):
            x.append((i*j)%2019)

    print(min(x))
Buggy python submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))

for i in range(n-2):
    if p[i]<p[i+1]<p[i+2] or p[i]>p[i+1]>p[i+2]:
        count+=1

print(count)



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

count=0

for i in range(n-2):
    if p[i]<p[i+1]<p[i+2] or p[i]>p[i+1]>p[i+2]:
        count+=1

print(count)
Buggy python submission (verdict: Runtime Error):
L,R=map(int, input().split())

if R-L+1>=2019:
    print(0)
else:
    L %= 2019
    R %= 2019
    if L<R:
        k=L*(L+1)
        print(k)
    else:
        print(0)


Fixed submission:
#スペース区切りの整数の入力
N, A, B  = map(int, input().split())

Train = A * N
Taxi = B

if Train > Taxi:
    print(Taxi)
else:
    print(Train)
Buggy python submission (verdict: Runtime Error):
L,R=map(int, input().split())

if R-L+1>=2019:
    print(0)
else:
    L %= 2019
    R %= 2019
    if L<R:
        k=L*L(+1)
        print(k)
    else:
        print(0)


Fixed submission:
L,R=map(int, input().split())
 
if R-L+1>=2019:
  print(0)
else:
  L %= 2019
  R %= 2019
  if L<R: 
    m = 2019
    for i in range(L,R+1):
      for j in range(i+1,R+1):
        m = min(m, (i*j)%2019)
    print(m)
  else:
    print(0)

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

if R-L>=2019:
    print(0)
else:
    L %= 2019
        R %= 2019
            if L<R:
m = 2019
    for i in range(L,R+1):
        for j in range(i+1,R+1):
            m = min(m, (i*j)%2019)
    print(m)
        else:
print(0)


Fixed submission:
L,R=map(int, input().split())
 
if R-L+1>=2019:
  print(0)
else:
  L %= 2019
  R %= 2019
  if L<R: 
    m = 2019
    for i in range(L,R+1):
      for j in range(i+1,R+1):
        m = min(m, (i*j)%2019)
    print(m)
  else:
    print(0)
Buggy python submission (verdict: Runtime Error):
a = [int(input()) for i in range(5)]

b = []

for i in a:
    n = i % 10
    b.append(n)

c = [i for i in b if i > 0]
c.sort()

sum = 0
for j in a:
  sum += j
 
n = 0
for k in c:
    n += 10 - k

N = sum + n + (c[0] - 10)
print(N)

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

b = []

for i in a:
    n = i % 10
    b.append(n)
sum = 0
if b == [0,0,0,0,0]:
    for j in a:
        sum += j
    print(sum)
else:
    c = [i for i in b if i > 0]
    c.sort()

    for j in a:
        sum += j
 
    n = 0
    for k in c:
        n += 10 - k

    N = sum + n + (c[0] - 10)
    print(N)
Buggy python submission (verdict: Runtime Error):
K = int(input())
target = S[K-1]
result = []
result2 = ''
for i in S:
    if i is target:
        result.append(i)
    else:
        result.append('*')
for i in result:
    result2 += i

print(result2)

Fixed submission:
N = int(input())
S = input()
K = int(input())
target = S[K-1]
result = []
result2 = ''
for i in S:
    if i is target:
        result.append(i)
    else:
        result.append('*')
for i in result:
    result2 += i

print(result2)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
  b = a[i:]+a[:i]
  ans[i] = sum(b[::2]) - sum(b[1::2])
print(*ans)

Fixed submission:
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
ans[0] = sum(a[::2]) - sum(a[1::2])
for i in range(1,n):
  ans[i] = a[i-1] * 2 - ans[i-1]
print(*ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
  f = True
  b = a[i:]+a[:i]
  for j in b:
    if f:
      ans[i] += j
      f = False
    else:
      ans[i] -= j
      f = True
print(*ans)

Fixed submission:
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
ans[0] = sum(a[::2]) - sum(a[1::2])
for i in range(1,n):
  ans[i] = a[i-1] * 2 - ans[i-1]
print(*ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
  f = True
  for j in a[i:]+a[:i]:
    if f:
      ans[i] += j
      f = False
    else:
      ans[i] -= j
      f = True
print(*ans)

Fixed submission:
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
ans[0] = sum(a[::2]) - sum(a[1::2])
for i in range(1,n):
  ans[i] = a[i-1] * 2 - ans[i-1]
print(*ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
if m == 1:
  print(0)
else:
  x = list(map(int, input().split()))
  x.sort()
  d = [0]*(m-1)
  for i in range(m-1):
    d[i] = x[i+1] - x[i]
  d.sort(reverse = True)
  sum = sum(d)
  for i in range(n-1):
    sum -= d[i]
  print(sum)

Fixed submission:
n, m = map(int, input().split())
if m == 1 or n >= m:
  print(0)
else:
  x = list(map(int, input().split()))
  x.sort()
  d = [0]*(m-1)
  for i in range(m-1):
    d[i] = x[i+1] - x[i]
  d.sort(reverse = True)
  sum = sum(d)
  for i in range(n-1):
    sum -= d[i]
  print(sum)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
if m == 1:
  print(0)
  exit()
x = list(map(int, input().split()))
x.sort()
d = [0]*(m-1)
for i in range(m-1):
  d[i] = x[i+1] - x[i]
d.sort(reverse = True)
sum = sum(d)
for i in range(n-1):
  sum -= d[i]
print(sum)

Fixed submission:
n, m = map(int, input().split())
if m == 1 or n >= m:
  print(0)
else:
  x = list(map(int, input().split()))
  x.sort()
  d = [0]*(m-1)
  for i in range(m-1):
    d[i] = x[i+1] - x[i]
  d.sort(reverse = True)
  sum = sum(d)
  for i in range(n-1):
    sum -= d[i]
  print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
for i in range(m // n + 1)[::-1]:
  if m % i == 0:
    print(i)
    break

Fixed submission:
def f():
  n, m = map(int, input().split())
  for i in range(m//n+1)[::-1]:
    if m%i==0:return i
print(f())

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
for i in reversed(range(m // n + 1)):
  if m % i == 0:
    print(i)
    exit()

Fixed submission:
def f():
  n, m = map(int, input().split())
  for i in range(m//n+1)[::-1]:
    if m%i==0:return i
print(f())
Buggy python submission (verdict: Runtime Error):
import math

def nCk(n, k):
    return math.factorial(n) / (math.factorial(k) * math.factorial(n - k))

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

for i in range(1, K + 1):
    print(int((nCk(N-K+1, i) * nCk(K-1, i-1)) % (10**9 + 7)))

Fixed submission:
from math import factorial

N, K = map(int, input().split())
mod = 10**9 + 7

def cmb(n, r):
    if n >= r:
        return int(factorial(n) // (factorial(r) * factorial(n-r)))
    else:
        return 0

for i in range(1, K+1):
    print(cmb(N-K+1, i) * cmb(K-1, i-1) % mod)
Buggy python submission (verdict: Runtime Error):
S = int(input())
ans = int(999)
diff = int(0)

for i in range(0, len(S) - 2):
    diff = abs(int(S[i:i+3]) - 753)
    if ans > diff:
        ans = diff
print(ans)

Fixed submission:
S = input()
ans = int(999)
diff = int(0)

for i in range(0, len(S) - 2):
    diff = abs(int(S[i:i+3]) - 753)
    if ans > diff:
        ans = diff
print(ans)
Buggy python submission (verdict: Runtime Error):
M=(P+3A)/2
M

Fixed submission:
A,P=(int(i) for i in input().split())
print((P+3*A)//2)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))
xn.append(x)
ym.append(y)
flag = 0
 
if x < y:
    for i in range(min(xn), max(ym)+1):
        if max(xn) < i and min(ym)>=i:
            print("No War")
            flag = 1
    if flag == 0:
        print("War")
else:
    print("War")

Fixed submission:
# coding: utf-8
 
a, b, c = map(int, input().split())
 
x = a*10 + b
y = b*10 + c
z = c*10 + a
 
if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else:
    print(z + b)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))
flag = 0

if x < y:
    for i in range(x+1, y+1):
        if max(xn) < i and min(ym)>=i:
            print("No War")
            flag = 1
        elif flag == 0 and i == y:
            print("War")
else:
    print("War")

Fixed submission:
# coding: utf-8
 
a, b, c = map(int, input().split())
 
x = a*10 + b
y = b*10 + c
z = c*10 + a
 
if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else:
    print(z + b)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))

if x < y:
    for i in range(x, y+1):
        if max(xn) < i and min(ym)>=i:
            print("No War")
            break
        elif i == y:
            print("War")
else:
    print("War")

Fixed submission:
# coding: utf-8
 
a, b, c = map(int, input().split())
 
x = a*10 + b
y = b*10 + c
z = c*10 + a
 
if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else:
    print(z + b)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))
 
if x < y:
    for i in range(x, y+1):
        if max(xn) < i and min(ym)>=i:
            print("War")
        elif i == y:
            print("No War")
else:
    print("No War")

Fixed submission:
# coding: utf-8
 
a, b, c = map(int, input().split())
 
x = a*10 + b
y = b*10 + c
z = c*10 + a
 
if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else:
    print(z + b)

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

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

x = a*10 + b
y = b*10 + c
z = c*10 + a

if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else
    print(z + b)

Fixed submission:
# coding: utf-8
 
a, b, c = map(int, input().split())
 
x = a*10 + b
y = b*10 + c
z = c*10 + a
 
if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else:
    print(z + b)
Buggy python submission (verdict: Runtime Error):
x,a=int(input().split())
if x>=a:print(10)
else:print(1)

Fixed submission:
x,a=map(int,input().split())
if x<a:print(0)
else:print(10)
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
ll=[];rl=[];count=0;ans=0
count1=0;count2=0
for i in range(m):
    l,r=map(int,input().split())
    ll.append(l);rl.append(r)
for o in range(n):
    count1+=1
    for i in range(m):

        if ll[i]<=o+1<=rl[i]:
            count2+=1
            
            if count2==m:
                ans+=1
    count2=0
print(ans)

Fixed submission:
n,m=map(int,input().split())
ll=[];rl=[]

for i in range(m):
    l,r=map(int,input().split())
    ll.append(l,);rl.append(r)
    
tans=min(rl)-max(ll)+1
if tans>=0:print(tans)
else:print(0)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=input()

if s[k-1]==A:
    s[k-1]=a
elif s[k-1]==B:
    s[k-1]=b
else:
    s[k-1]=c
print(s)

Fixed submission:
n,k=map(int,input().split())
s=list(input())
k-=1

if s[k]=="A":
    s[k]="a"
elif s[k]=="B":
    s[k]="b"
else:
    s[k]="c"

print("".join(s))