Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import itertools
a=int(input())
b=list(map(int,input().split()))
aak=list(itertools.combinations(b,a-1))
ans=[]
def gud(a,b):
  if a%b==0:
    return b
  else:
    return gud(b,a%b)
def allgud(a):
  if len(a)==1:
    return a[0]
  else:
    a+=(gud(a[0],a[1]),)
    return allgud(a[2:])
ans=list(map(lambda d: allgud(d) ,aak))
print(max(ans))

Fixed submission:
from fractions import*
a=int(input())
b=list(map(int,input().split()))
alis=[b[0]]
blis=[b[-1]]
for i in range(a-1):
  alis.extend([gcd(alis[-1],b[i+1])])
  blis.extend([gcd(blis[-1],b[-i-2])])
blis=list(reversed(blis))+[0]
alis=[0]+alis
ans=[]
for i in range(a):
	ans+=[gcd(alis[i],blis[i+1])]
print(max(ans))

Buggy python submission (verdict: Runtime Error):
import itertools
a=int(input())
b=list(map(int,input().split()))
aak=list(itertools.combinations(b,a-1))
ans=[]
def gud(a,b):
  if a%b==0:
    return b
  else:
    return gud(b,a%b)
def allgud(a):
  if len(a)==1:
    return a[0]
  else:
    a+=(gud(a[0],a[1]),)
    return allgud(a[2:])
ans=[]
for i in aak:
  ans+=[allgud(i)]
print(max(ans))

Fixed submission:
from fractions import*
a=int(input())
b=list(map(int,input().split()))
alis=[b[0]]
blis=[b[-1]]
for i in range(a-1):
  alis.extend([gcd(alis[-1],b[i+1])])
  blis.extend([gcd(blis[-1],b[-i-2])])
blis=list(reversed(blis))+[0]
alis=[0]+alis
ans=[]
for i in range(a):
	ans+=[gcd(alis[i],blis[i+1])]
print(max(ans))

Buggy python submission (verdict: Runtime Error):
import itertools
a=int(input())
b=list(map(int,input().split()))
aak=list(itertools.combinations(b,a-1))
ans=[]
def gud(a,b):
  if a%b==0:
    return b
  else:
    return gud(b,a%b)
for i in aak:
  for v in range(a-2):
    i+=(gud(i[v],i[v+1]),)
    i+=1
  ans+=[i[-1]]
print(max(ans))

Fixed submission:
from fractions import*
a=int(input())
b=list(map(int,input().split()))
alis=[b[0]]
blis=[b[-1]]
for i in range(a-1):
  alis.extend([gcd(alis[-1],b[i+1])])
  blis.extend([gcd(blis[-1],b[-i-2])])
blis=list(reversed(blis))+[0]
alis=[0]+alis
ans=[]
for i in range(a):
	ans+=[gcd(alis[i],blis[i+1])]
print(max(ans))
Buggy python submission (verdict: Runtime Error):
a=int(input())
lis=list(map(int,input().split()))
lis=sorted(lis)
i=0
while lis[i]<0 and i<a-1:
  if lis[i]<=0 and lis[i+1]>=0:
    if -1*lis[i]>lis[i+1]:
      lis[i],lis[i+1]=-lis[i],-lis[i+1]
  elif lis[i]<=0 and lis[i+1]<=0:
    lis[i],lis[i+1]=-lis[i],-lis[i+1]
  i+=2
print(sum(lis))

Fixed submission:
a=int(input())
b=list(map(int,input().split()))
c=list(filter(lambda n:n<=0,b))
c=list(map(lambda n:n*-1,c))
d=list(filter(lambda n:n>0,b))
ans=sum(d)+sum(c)
ansl=c+d
if len(c)%2!=0:  
  ans-=min(ansl)*2
print(ans)

Buggy python submission (verdict: Runtime Error):
a=int(input())
lis=list(map(int,input().split()))
lis=sorted(lis)
i=0
while lis[i]<0:
  if lis[i]<=0 and lis[i+1]>=0:
    if -1*lis[i]>lis[i+1]:
      lis[i],lis[i+1]=-lis[i],-lis[i+1]
  elif lis[i]<=0 and lis[i+1]<=0:
    lis[i],lis[i+1]=-lis[i],-lis[i+1]
  i+=2
print(sum(lis))

Fixed submission:
a=int(input())
b=list(map(int,input().split()))
c=list(filter(lambda n:n<=0,b))
c=list(map(lambda n:n*-1,c))
d=list(filter(lambda n:n>0,b))
ans=sum(d)+sum(c)
ansl=c+d
if len(c)%2!=0:  
  ans-=min(ansl)*2
print(ans)
Buggy python submission (verdict: Runtime Error):
a=input().sprit()
ans=0
if a[1]-1a[0]>=1:
  ans+=a[1]*2-1
elif a[0]-a[1]>=1:
  ans+=a[0]*2-1
else:
  ans+=a[0]+a[1]
print(ans)
  

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

Fixed submission:
a=list(map(int,input().split()))
b=list(sorted([int(input()) for i in range(a[0])]))
ans=[]
for i in range(a[0]-a[1]+1):
  ans+=[abs(b[a[1]-1+i]-b[i])]
print(min(ans))

Buggy python submission (verdict: Runtime Error):
a=list(map(int,input.split()))
lis=[]
for i in range(a[0]):
  lis+=int(input())
lis=lis.sort()
print(lis)

Fixed submission:
a=list(map(int,input().split()))
b=list(sorted([int(input()) for i in range(a[0])]))
ans=[]
for i in range(a[0]-a[1]+1):
  ans+=[abs(b[a[1]-1+i]-b[i])]
print(min(ans))
Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=[]
for i in input().split():
  b.append(abs(int(i)-a[1]))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(b)>1:
  b.append(ucl(b[0],b[1]))
  del b[0],b[1]
print(b[0])  

Fixed submission:
a=list(map(int,input().split()))
x=[]
for i in input().split():
  x.append(abs(int(i)-a[1]))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(x) > 1:
  x2 = []
  mn_x = min(x)
  for n in range(len(x)):
    mod = x[n] % mn_x
    if mod != 0:
      x2.append(mod)
  x2.append(mn_x)
  x = x2
print(x[0])

Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=[]
for i in input().split():
  b.append(abs(int(i)-a[1]))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(b)>1:
  b.append(ucl(b[0],b[1]))
  del b[0]
  del b[0]
print(b[0])  

Fixed submission:
a=list(map(int,input().split()))
x=[]
for i in input().split():
  x.append(abs(int(i)-a[1]))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(x) > 1:
  x2 = []
  mn_x = min(x)
  for n in range(len(x)):
    mod = x[n] % mn_x
    if mod != 0:
      x2.append(mod)
  x2.append(mn_x)
  x = x2
print(x[0])

Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=list(map(lambda b:abs(int(b)-a[1]),input().split()))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(b)>1:
  b.append(ucl(b[0],b[1]))
  del b[0]
  del b[0]
print(b[0])  

Fixed submission:
a=list(map(int,input().split()))
x=[]
for i in input().split():
  x.append(abs(int(i)-a[1]))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(x) > 1:
  x2 = []
  mn_x = min(x)
  for n in range(len(x)):
    mod = x[n] % mn_x
    if mod != 0:
      x2.append(mod)
  x2.append(mn_x)
  x = x2
print(x[0])

Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=list(map(lambda b:abs(int(b)-a[1]),input().split()))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(b)>1:
  b+=[ucl(b[0],b[1])]
  del b[0]
  del b[0]
print(b[0])  

Fixed submission:
a=list(map(int,input().split()))
x=[]
for i in input().split():
  x.append(abs(int(i)-a[1]))
def ucl(a,b):
  if a%b==0:
    return b
  else:
    return ucl(b,a%b)
while len(x) > 1:
  x2 = []
  mn_x = min(x)
  for n in range(len(x)):
    mod = x[n] % mn_x
    if mod != 0:
      x2.append(mod)
  x2.append(mn_x)
  x = x2
print(x[0])
Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
lis=[]
for i in range(a):
  cou=0
  v=int(input())
  if lis==[]:
    lis+=[v]
  else:
    for i in range(len(lis)):
      if lis[i]==v:
        del lis[i]
        cou=1
        break
    if cou!=1:
      lis+=[v]
      
print(len(lis))

Fixed submission:
a=int(input())
lis=[]
anlis=[]
for j in range(a):
  lis+=[int(input())]
lis.sort()
i=0
while i<len(lis):
  if i==len(lis)-1:
    anlis+=[lis[i]]
  elif lis[i]!=lis[i+1]:
    anlis+=[lis[i]]
  else:
    i+=1
  i+=1
print(len(anlis))
Buggy python submission (verdict: Runtime Error):
n = input()
if n == 999:
   print("111")
elif n == 991:
    print("119")
elif n == 911:
    print("199")
elif n == 919:
    print("191")
elif n == 199:
    print("911")
elif n == 191:
    print("919")
elif n == 199:
    print("911")
eise:
    print("999")

Fixed submission:
n = int(input())
if (n == 999):
   print("111")
elif (n == 991):
    print("119")
elif (n == 911):
    print("199")
elif (n == 919):
    print("191")
elif (n == 199):
    print("911")
elif (n == 191):
    print("919")
elif (n == 199):
    print("911")
elif (n == 119):
    print("991")
elif (n == 111):
    print("999")

Buggy python submission (verdict: Runtime Error):
n = input()
if n = 999:
   print("111")
elif n = 991:
    print("119")
elif n = 911:
    print("199")
elif n = 919:
    print("191")
elif n = 199:
    print("911")
elif n = 191:
    print("919")
elif n = 199:
    print("911")
eise:
    print("999")

Fixed submission:
n = int(input())
if (n == 999):
   print("111")
elif (n == 991):
    print("119")
elif (n == 911):
    print("199")
elif (n == 919):
    print("191")
elif (n == 199):
    print("911")
elif (n == 191):
    print("919")
elif (n == 199):
    print("911")
elif (n == 119):
    print("991")
elif (n == 111):
    print("999")
Buggy python submission (verdict: Runtime Error):
n = input
if n % 2 = 1:
    print(n * 2)
else:
    print(n)

Fixed submission:
n = int(input())
if n % 2 == 1:
    print(n * 2)
else:
    print(n)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
x = 0
for i in range(n+1):
    f = set(s[i:])
    d = set(s[:i])
    count =len(f & d)
    if count > x:
        x = count
print(x)
n = int(input())
s = input()
c = 0
for i in range(n+1):
    f = set(s[i:])
    d = set(s[:i])
    count =len(f & d)
    if count > c:
        c = count
print(c)

Fixed submission:
n = int(input())
s = input()
x = 0
for i in range(n+1):
    f = set(s[i:])
    d = set(s[:i])
    count =len(f & d)
    if count > x:
        x = count
print(x)
Buggy python submission (verdict: Runtime Error):
a,b,c = input()
if(a + b < c):
    print(Yes)
else:
    print(No)

Fixed submission:
a,b,c = map(int, input().split())
if a + b < c:
	print("No")
else:
	print("Yes")
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2]

Fixed submission:
r0 = input()
r1 = input()
r2 = input()
print(r0[0],end='')
print(r1[1],end='')
print(r2[2],end='')
Buggy python submission (verdict: Runtime Error):
n = int(input)
a = int(input)
if  n % 500 <= a:
    print("Yes")
else:
    print("No")

Fixed submission:
n = int(input())
a = int(input())
if  n % 500 <= a:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
for a in range(A + 1):
    for b in range(B + 1):
        for c in range(C + 1):
            if 500*a + 100*b + 50*c == X:
                m+=1
print(m)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
m = 0
for a in range(A + 1):
    for b in range(B + 1):
        for c in range(C + 1):
            if 500*a + 100*b + 50*c == X:
                m+=1
print(m)
Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if (a*b % 2 == 1):
    print("0dd")
else:
    print("Even")

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

Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if (a*b%2 = 1):
    print("0dd")
else:
    print("Even")

Fixed submission:
(a,b)=map(int,input().split())
if a*b%2==0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
N,A,B = int.input()
M = A+B
if (M%2==1):
    print("Borys")
else:
    print("Alice")

Fixed submission:
n, a, b = map(int,input().split())
m = a + b
if (m % 2==1):
    print("Borys")
else:
    print("Alice")

Buggy python submission (verdict: Runtime Error):
N,A,B = map(int.input())
M = N+A+B
if (M%2==1):
    print("Borys")
else:
    print("Alice")

Fixed submission:
n, a, b = map(int,input().split())
m = a + b
if (m % 2==1):
    print("Borys")
else:
    print("Alice")

Buggy python submission (verdict: Runtime Error):
N,A,B = map(int.input())
if ((N+A+B)%2==1):
    print("Borys")
else:
    print("alice")

Fixed submission:
n, a, b = map(int,input().split())
m = a + b
if (m % 2==1):
    print("Borys")
else:
    print("Alice")
Buggy python submission (verdict: Runtime Error):
N=int(input())
print(len(set([input() for n in range(N)])))

Fixed submission:
print('2018'+input()[4:])

Buggy python submission (verdict: Runtime Error):
N=int(input())
print(len(set([input() for n in range(N)]))

Fixed submission:
print('2018'+input()[4:])
Buggy python submission (verdict: Runtime Error):
N=int(input())
print(len(set(input() for n in range(N)])))

Fixed submission:
N=int(input())
print(len(set([input() for n in range(N)])))
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
d = y
a = (d*7)%9
b = (d-a*4)
c = n-a-b
if c>=0 and b>=0:
    print(b,a,c)
else:
    print(-1,-1,-1)

Fixed submission:
N, Y = map(int, input().split())
Y //= 1000
k = min((Y - N) // 4, Y // 5)
if 9 * k >= 2 * (Y - N):
    x = (Y - N) - 4 * k
    y = -2 * (Y - N) + 9 * k
    z = Y - 5 * k
    print(x, y, z)
else:
    print(-1, -1, -1)

Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().sprit())
d = y
a = (d*7)%9
b = (d-a*4)
c = n-a-b
if c>=0 and b>=0:
    print(b,a,c)
else:
    print(-1,-1,-1)

Fixed submission:
N, Y = map(int, input().split())
Y //= 1000
k = min((Y - N) // 4, Y // 5)
if 9 * k >= 2 * (Y - N):
    x = (Y - N) - 4 * k
    y = -2 * (Y - N) + 9 * k
    z = Y - 5 * k
    print(x, y, z)
else:
    print(-1, -1, -1)

Buggy python submission (verdict: Runtime Error):
x,y = map(int(input().sprit)
d = y
a = (d*7)%9
b = (d-a*4)
c = n-a-b
if c>=0 and b>=0:
    print(b,a,c)
else:
    print(-1,-1,-1)


Fixed submission:
N, Y = map(int, input().split())
Y //= 1000
k = min((Y - N) // 4, Y // 5)
if 9 * k >= 2 * (Y - N):
    x = (Y - N) - 4 * k
    y = -2 * (Y - N) + 9 * k
    z = Y - 5 * k
    print(x, y, z)
else:
    print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
x,y = input().split(" ")
if x < y:
    print("<")
elif x > y:
    print(">")
else x == y:
    print("=")

Fixed submission:
x,y = input().split(" ")
if x < y:
    print("<")
elif x > y:
    print(">")
else:
    print("=")

Buggy python submission (verdict: Runtime Error):
x,y = input().split()
if x < y:
    print("<")
elif x > y:
    print(">")
else x == y:
    print("=")

Fixed submission:
x,y = input().split(" ")
if x < y:
    print("<")
elif x > y:
    print(">")
else:
    print("=")
Buggy python submission (verdict: Runtime Error):
from decimal import Decimal
a,b,c = map(int,input().split())
a2,b2,c2,2ab = a**2,b**2,c**2,2*Decimal(a**0.5)*Decimal(b**0.5)
print('Yes' if a2+2ab+b2<c2 else 'No')

Fixed submission:
a,b,c = map(int,input().split())
print('Yes' if c-a-b>0 and 4*a*b<c**2+a**2+b**2-2*a*c-2*b*c+2*a*b else 'No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
card = map(int,input().split(" "))

all = 0
for i in card:
    all += i

a = all
ab = all
for i in range(len(card),-1):
    b -= card[i]
    if abs(a - b) > ab:
        break
    a,ab = b,abs(a - b)
print(ab)

Fixed submission:
N = int(input())
card = [int(i) for i in input().split(" ")]
 
all = 0
for i in card:
    all += i
 
a = card[0]
mab = abs(a - (all - a))
for i in range(1,len(card) - 1):
    a += card[i]
    if mab > abs(a - (all - a)):
    	mab = abs(a - (all - a))
print(mab)
Buggy python submission (verdict: Runtime Error):
# ABC 169
import math

a, b = map(np.float64, input().split())
c = math.floor(a*b)
print(c)

Fixed submission:
# ABC 169
import math

a, b = input().split()
a = int(a)
b = int(round(float(b)*100))
print(a*b//100)
Buggy python submission (verdict: Runtime Error):
a = [list(map(int, input().split())) for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]

a = np.array(a)
b = np.array(b)

after = np.zeros((3,3))
for i in range(N):
    after += a == b[i]
    
bool1 = (np.sum(after, axis=0)==3).sum()
bool2 = (np.sum(after, axis=1)==3).sum()
bool3 = (after[0,0]+after[1,1]+after[2,2])==3
bool4 = (after[0,2]+after[1,1]+after[2,0])==3

if bool1+bool2+bool3+bool4>0:
    ans = 'Yes'
else:
    ans = 'No'
    
print(ans)

Fixed submission:
import numpy as np

a = [list(map(int, input().split())) for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]

a = np.array(a)
b = np.array(b)

after = np.zeros((3,3))
for i in range(N):
    after += a == b[i]
    
bool1 = (np.sum(after, axis=0)==3).sum()
bool2 = (np.sum(after, axis=1)==3).sum()
bool3 = (after[0,0]+after[1,1]+after[2,2])==3
bool4 = (after[0,2]+after[1,1]+after[2,0])==3

if bool1+bool2+bool3+bool4>0:
    ans = 'Yes'
else:
    ans = 'No'
    
print(ans)
Buggy python submission (verdict: Runtime Error):
n, r = int(input().split())

if n>=10:
  inner_rate = r
else:
  inner_rate = r + 100*(10-n)
  
print(str(inner_rate))

Fixed submission:
n, r = map(int, input().split())
 
if n>=10:
  inner_rate = r
else:
  inner_rate = r + 100*(10-n)
  
print(str(inner_rate))
Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
l = np.array(map(int, input().split()))

ans = np.sum((l - round(np.mean(l)))**2)
print(ans)

Fixed submission:
import numpy as np
n = int(input())
l = list(map(int, input().split()))

l = np.array(l)
ans = np.sum((l - round(np.mean(l)))**2)
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

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

res = np.zeros(N)
for i in range(N):
  res[i] = (A==A[i]).sum()

if (res>1).sum() > 0:
  ans = 'NO'
else:
  ans = 'YES'
  
print(str(ans))

Fixed submission:
import numpy as np

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

A_uni = np.unique(A)
if len(A_uni) < N:
    ans = 'NO'
else:
    ans = 'YES'
print(str(ans))

Buggy python submission (verdict: Runtime Error):
import numpy as np

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

res = np.zeros(N)
for i in range(N):
  res[i] = (A==A[i]).sum()

if (res>1).sum() > 0:
  ans = 'NO'
else:
  ans = 'YES'
  
print(str(ans))

Fixed submission:
import numpy as np

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

A_uni = np.unique(A)
if len(A_uni) < N:
    ans = 'NO'
else:
    ans = 'YES'
print(str(ans))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys

N=int(input())

ans_l=[1]*N

if N == 1:
    print("1")
else:
    for i in range(N):
        A=int(input())
        for j in range(A):
            a,b=map(int,input().split())
            ans_l[a-1]=ans_l[a-1]*b
    print(sum(ans_l))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
a = [int(x) for x in sys.stdin.readline().rstrip().split()]
if sum(a) < 22:
    print("win")
else:
    print("bust")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import Levenshtein

a=input()
a_half=a[:len(a)//2:]
a_half_int=a[-(-len(a)//2)::]
a_half_int=a_half_int[::-1]

ans=Levenshtein.distance(a_half,a_half_int)
print(ans)


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

a=input()
a_half=a[:len(a)//2:]
a_half_int=a[-(-len(a)//2)::]
a_half_int=a_half_int[::-1]
b=list(a_half)
c=list(a_half_int)
ans=0
for i in range(len(a)//2):
    if b[i] != c[i]:
        ans+=1

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
 
args = sys.argv

print(args[0])
 
a = int(args[1])
b = int(args[2])
 
sum = a + b
minus = a - b
sub = a * b
 
if (sum - minus) > 0:
  print("足し算のが引き算より大きい")
  if (sum - sub) > 0:
    print("足し算のが掛け算より大きい")
    print(sum)
  else:
    print("掛け算のが足し算より大きい")
    print(sub)
else:
  print("引き算のが足し算より大きい")
  if (minus - sub) > 0:
    print("引き算のが掛け算より大きい")
    print(minus)
  else:
    print("掛け算のが引き算より大きい")
    print(sub)


Fixed submission:
import sys

a, b = map(int, input().split())
 
sum = a + b
minus = a - b
sub = a * b
 
if (sum - minus) > 0:
  if (sum - sub) > 0:
    print(sum)
  else:
    print(sub)
else:
  if (minus - sub) > 0:
    print(minus)
  else:
    print(sub)

Buggy python submission (verdict: Runtime Error):
import sys
 
args = sys.argv

print(args[0])
 
a = int(args[1])
b = int(args[2])
 
sum = a + b
minus = a - b
sub = a * b
 
if (sum - minus) < 0:
  print("足し算のが引き算より小さい")
  if (sum - sub) < 0:
    print("足し算のが掛け算より小さい")
    print(sum)
  else:
    print("掛け算のが足し算より小さい")
    print(sub)
else:
  print("引き算のが足し算より小さい")
  if (minus - sub) < 0:
    print("引き算のが掛け算より小さい")
    print(minus)
  else:
    print("掛け算のが引き算より小さい")
    print(sub)


Fixed submission:
import sys

a, b = map(int, input().split())
 
sum = a + b
minus = a - b
sub = a * b
 
if (sum - minus) > 0:
  if (sum - sub) > 0:
    print(sum)
  else:
    print(sub)
else:
  if (minus - sub) > 0:
    print(minus)
  else:
    print(sub)

Buggy python submission (verdict: Runtime Error):
import sys

args = sys.argv

a = args[0]
b = args[1]

sum = a + b
minus = a - b
sub = a * b

if sum - minus < 0:
  if sum - sub < 0:
    return sum
  return sub

if minus - sub < 0:
  return sub

return minus

Fixed submission:
import sys

a, b = map(int, input().split())
 
sum = a + b
minus = a - b
sub = a * b
 
if (sum - minus) > 0:
  if (sum - sub) > 0:
    print(sum)
  else:
    print(sub)
else:
  if (minus - sub) > 0:
    print(minus)
  else:
    print(sub)
Buggy python submission (verdict: Time Limit Exceeded):
import math

N = int(input())

min_length = -1
for i in range(int(math.sqrt(N))):
    for j in range(i + 1):
        A = j + 1
        if N % A == 0:
            B = int(N / A)
            len_a = len(str(A))
            len_b = len(str(B))
            length = len_a if len_a >= len_b else len_b
            if min_length == -1 or length < min_length:
                # print("len:{}, A:{}, B:{}".format(length, A, B))
                min_length = length
print(min_length)


Fixed submission:
import math

N = int(input())

min_length = -1
for A in range(1, int(math.sqrt(N)) + 1, 1):
    if N % A == 0:
        B = int(N / A)
        len_a = len(str(A))
        len_b = len(str(B))
        length = len_a if len_a >= len_b else len_b
        if min_length == -1 or length < min_length:
            # print("len:{}, A:{}, B:{}".format(length, A, B))
            min_length = length
print(min_length)