Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A,B,T=map(input(),split())
a=int(T/A+0.5)
print(a*B)

Fixed submission:
A,B,T=map(int,input().split())
count=0
while T>=A:
	T=T-A
	count+=1
print(count*B)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
s=S.index('.')
k=S[s::]
a=k.count('.')
b=k.count('#')
if a>b: print(b)
else: print(a)

Fixed submission:
N=int(input())
S=input()
b,w,ans=0,0,0
w=S.count('.')
ans=w
for i in S:
	if i=='#':b+=1
	else:w-=1
	ans=min(b+w,ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
S=input()
po=[0]
X=[]
i=0
for i in range(N-1):
	if not S[i] == S[i+1]:
		po.append(i+1)
po.append(len(S))
for i in range(len(po)):
	if 2*K+i+1>=len(po):
		X.append(po[2*K+i]-po[i])
		break
	elif S[po[i]]=='0':
		X.append(po[2*K+i]-po[i])
	else:
		X.append(po[2*K+1+i]-po[i])
print(max(X))

Fixed submission:
N,K=map(int,input().split())
S=input()
po=[0]
X=[]
i=0
for i in range(N-1):
	if not S[i] == S[i+1]:
		po.append(i+1)
po.append(len(S))
for i in range(len(po)):
	if 2*K+1>=len(po):
		X.append(po[-1])
		break
	elif 2*K+i+1>=len(po):
		X.append(po[2*K+i]-po[i])
		break
	elif S[po[i]]=='0':
		X.append(po[2*K+i]-po[i])
	else:
		X.append(po[2*K+1+i]-po[i])
print(max(X))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
S=input()
po=[0]
ans,q,left,right=0,0,0,0
for i in range(1,N):
	p=S[i-1]+S[i]
	if (p=='10')|(p=='01'):
		po.append(i)
po.append(len(S))
for i in range(len(po)):
	if K*2>=len(po):
		ans=po[-1]
		break
	elif (S[0]=='0')&(right<1):
		q=po[2*K]
		left=2
		right=2*K+left
	elif (S[0]=='1')&(right<1):
		q=po[2*K+1]
		left=1
		right=2*K+left
	elif right<=len(po):
		q=po[right]-po[left]+1
		left+=2
		right+=2
	elif S[-1]=='0':
		right=len(po)-1
		left=right-2*K
		q=po[right]-po[left]
		ans=max(q,ans)
		break
	else:
		right=len(po)-1
		left=right-2*K-1
		q=po[right]-po[left]
		ans=max(q,ans)
		break
	ans=max(q,ans)
print(ans)

Fixed submission:
N,K=map(int,input().split())
S=input()
po=[0]
X=[]
i=0
for i in range(N-1):
	if not S[i] == S[i+1]:
		po.append(i+1)
po.append(len(S))
for i in range(len(po)):
	if 2*K+1>=len(po):
		X.append(po[-1])
		break
	elif 2*K+i+1>=len(po):
		X.append(po[2*K+i]-po[i])
		break
	elif S[po[i]]=='0':
		X.append(po[2*K+i]-po[i])
	else:
		X.append(po[2*K+1+i]-po[i])
print(max(X))

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
S=input()
po=[0]
p=0
ans=0
left,right=0,0
q=0
for i in range(1,N):
	p=S[i-1]+S[i]
	if (p=='10')|(p=='01'):
		po.append(i)
po.append(len(S))
for i in range(len(po)-K+2):
	if K*2>len(po):
		ans=po[-1]
		break
	elif (S[0]=='0')&(right<=1):
		q=po[2*K]
		left=2
		right=2*K+left
	elif (S[0]=='1')&(right<=1):
		q=po[2*K+1]
		left=1
		right=2*K+left
	elif right<len(po):
		q=po[right]-po[left]
		left+=2
		right+=2
	elif S[-1]=='0':
		right=len(po)-1
		left=right-2*K
		q=po[right]-po[left]
	else:
		right=len(po)-1
		left=right-2*K-1
		q=po[right]-po[left]
	ans=max(q,ans)
print(ans)

Fixed submission:
N,K=map(int,input().split())
S=input()
po=[0]
X=[]
i=0
for i in range(N-1):
	if not S[i] == S[i+1]:
		po.append(i+1)
po.append(len(S))
for i in range(len(po)):
	if 2*K+1>=len(po):
		X.append(po[-1])
		break
	elif 2*K+i+1>=len(po):
		X.append(po[2*K+i]-po[i])
		break
	elif S[po[i]]=='0':
		X.append(po[2*K+i]-po[i])
	else:
		X.append(po[2*K+1+i]-po[i])
print(max(X))
Buggy python submission (verdict: Time Limit Exceeded):
S=input()
ans=0
for i in range(len(S)//2+1):
	ans += S.count('10')
	S = S.replace('10','')
	ans += S.count('01')
	S = S.replace('01','')
print(2*ans)

Fixed submission:
S=input()
num0 = S.count('0')
num1 = S.count('1')
ans = 2*min(num0,num1)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
S=input()
ans=0
while ('10' in S) | ('01' in S):
	ans += S.count('10')
	S = S.replace('10','')
	ans += S.count('01')
	S = S.replace('01','')
print(2*ans)

Fixed submission:
S=input()
num0 = S.count('0')
num1 = S.count('1')
ans = 2*min(num0,num1)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = input().split()
A = [int(i) for i in A]

def yakusuu(p):
	A.reverse()
	for i in range(1,p):
		if A[0] % A[i] == 0:
			A.pop(0)
			return
	else:
		return
def syou(k):
	A.sort()
	if A[0] == 0:
		A.pop(0)
		if len(A) > 1:
			A[k-1] = A[k-1] % A[0]
	else:
		A[k] = A[k] % A[0]
	return A
for i in range(N):
	if len(A) >= 1:
		yakusuu(len(A))
while	len(A) > 1:
	syou(len(A)-1)
print(A[0])

Fixed submission:
A,B=map(int,input().split())
if B%A==0:
	print(A+B)
else:
	print(B-A)
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
N = int(input())
A = input().split()
A = [int(i) for i in A]
print(reduce(math.gcd,A))

Fixed submission:
import fractions
from functools import reduce
N = int(input())
A = input().split()
A = [int(i) for i in A]
print(reduce(fractions.gcd,A))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = input().split()
A = [int(i) for i in A]

def yakusuu(p):
	A.reverse()
	for i in range(1,p):
		if A[0] % A[i] == 0:
			A.pop(0)
			return
	else:
		return
def syou(k):
	A.sort()
	if A[0] == 0:
		A.pop(0)
		if len(A) > 1:
			A[k-1] = A[k-1] % A[0]
	else:
		A[k] = A[k] % A[0]
	return A
for i in range(N):
	if len(A) >= 1:
		yakusuu(len(A))
while	len(A) > 1:
	syou(len(A)-1)
print(A[0])

Fixed submission:
import fractions
from functools import reduce
N = int(input())
A = input().split()
A = [int(i) for i in A]
print(reduce(fractions.gcd,A))
Buggy python submission (verdict: Runtime Error):
S=input()
K=int(input())
for j in S:
	if j=='1':
		if j==K:
			co='1'
			break
	else:
		co=j
		break
print(co)

Fixed submission:
a,b=map(int,input().split())
print((a-1)*(b-1))
Buggy python submission (verdict: Runtime Error):
S=input()
K=int(input())
co=0
for j in S:
	if j!='1' and j<=K:
		print(j)
		co=1
		break
if co==0:
	print('1')

Fixed submission:
S=input()
K=int(input())
co=0	
a=0
for j in S:
	a=a+1
	if j!='1':
		print(j)
		co=1
		break
	if a==K:
		break
if co==0:
	print('1')

Buggy python submission (verdict: Runtime Error):
S=input()
K=int(input())
for j in S:
	if j=='1':
		if j==K:
			co='1'
			break
	else:
		co=j
		break
print(co)

Fixed submission:
S=input()
K=int(input())
co=0	
a=0
for j in S:
	a=a+1
	if j!='1':
		print(j)
		co=1
		break
	if a==K:
		break
if co==0:
	print('1')
Buggy python submission (verdict: Runtime Error):
n, x, t = [int(x) for x in input().split()]
print(ceil(n/x*t))

Fixed submission:
import math
n, x, t = [int(x) for x in input().split()]
print(math.ceil(n/x)*t)
Buggy python submission (verdict: Runtime Error):
s = input()

ans = s.index("S")

print(ans)


Fixed submission:
s = input()

if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())

if k % 2 == 0 or k % 5 == 0:
  print(-1)
  exit()

a = 7
ans = 0
for i in range(10**7):
  if a % k == 0:
    ans = i + 1
    break
  else:
    a = a*10 + 7
    ans = i + 1


print(ans)


Fixed submission:
k = int(input())

if k % 2 == 0 or k % 5 == 0:
  print(-1)
  exit()

a = 7
ans = 0
for i in range(10**7):
  a = a % k
  if a % k == 0:
    ans = i + 1
    break
  else:
    a = a*10 + 7
    ans = i + 1


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())

if k % 2 == 0:
  print(-1)
  exit()

a = 7
ans = 0
for i in range(10**7):
  if a % k == 0:
    ans = i + 1
    break
  else:
    a = a*10 + 7
    ans = i + 1


print(ans)


Fixed submission:
k = int(input())

if k % 2 == 0 or k % 5 == 0:
  print(-1)
  exit()

a = 7
ans = 0
for i in range(10**7):
  a = a % k
  if a % k == 0:
    ans = i + 1
    break
  else:
    a = a*10 + 7
    ans = i + 1


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())

if k % 2 == 0:
  print(-1)
  exit()

a = [7]
ans = 0
for i in a:
  if i % k == 0:
    ans += 1
    break
  else:
    a += [i*10 + 7]
    ans += 1


print(ans)

Fixed submission:
k = int(input())

if k % 2 == 0 or k % 5 == 0:
  print(-1)
  exit()

a = 7
ans = 0
for i in range(10**7):
  a = a % k
  if a % k == 0:
    ans = i + 1
    break
  else:
    a = a*10 + 7
    ans = i + 1


print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())

lst = [0]*n
a = int(n ** 0.5)

for x in range(1, a):
    for y in range(1, a):
        for z in range(1, a):
            b = x**2 + y**2 + z**2 + x*y + y*z + z*x
            while b <= n:
                lst[b - 1] += 1

for i in lst:
    print(i) 


Fixed submission:
l, r, d = map(int, input().split())

a = []
for i in range(l, r + 1):
    if i % d == 0:
        a.append(i)

print(len(a))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

lst = [0]*n
a = int(n ** 0.5)

for x in range(1, a):
    for y in range(1, a):
        for z in range(1, a):
            b = x**2 + y**2 + z**2 + x*y + y*z + z*x
            while b <= n:
                lst[b - 1] += 1

for i in lst:
    print(i) 


Fixed submission:
n = int(input())

lst = [0]*n
a = int(n ** 0.5)

for x in range(1, a):
    for y in range(1, a):
        for z in range(1, a):
            b = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if b > n:
                continue
            else:
                lst[b - 1] += 1

for i in lst:
    print(i)
Buggy python submission (verdict: Runtime Error):
x = input()
if X.isupper():
  print('A')
else:
  print('a')

Fixed submission:
x = input()
if x.isupper():
  print('A')
else:
  print('a')
Buggy python submission (verdict: Runtime Error):
XY = input()
X = int,(XY.split([0]))
Y = int,(XY.split([1]))

for i in range(X + 1):
  if 2 * i + 4 * (X - i) == Y:
    print("Yes")
  else:
    print("No")
    

Fixed submission:
XY = input()
xy = list(map(int, XY.split()))

x = xy[0]
y = xy[1]

exist = False
for i in range(x + 1):
  if 2 * i + 4 * (x - i) == y:
    exist = True
    break
    
if exist:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input().split()))

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
    if answer > 10**18:
      answer = -1
      break
  print(answer)
  

Fixed submission:
a = list(map(int, input().split()))
print(a[0] * a[1])

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

answer = 1
if 0 in A:
    print(0)
else:
    for i in A:
        answer *= i
        if answer > 10**18:
            print(-1)
            exit()
print(answer)
    


Fixed submission:
a = list(map(int, input().split()))
print(a[0] * a[1])

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

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
    if answer > 10**18:
      print(-1)
      exit()
	print(answer)

Fixed submission:
a = list(map(int, input().split()))
print(a[0] * a[1])

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

answer = 1
if 0 in A:
    print(0)
else:
    for i in A:
        answer *= i
        if answer > 10**18:
            print(-1)
            exit()
    print(answer)
    

Fixed submission:
a = list(map(int, input().split()))
print(a[0] * a[1])

Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))
print(a[0] * b[1])

Fixed submission:
a = list(map(int, input().split()))
print(a[0] * a[1])
Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input().split()))

answer = 1
if 0 in A:
  print(0)
  break
else:
  for i in A:
    answer *= i
  if answer > 10**18:
    print(-1)
  else:
    print(answer)


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

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
    if answer > 10**18:
      answer = -1
      break
  print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
A = list(map(int, input().split()))

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
  if answer > 10**18:
    print(-1)
  else:
    print(answer)


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

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
    if answer > 10**18:
      answer = -1
      break
  print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
A = list(map(int, input().split()))

answer = 1
if 0 in A:
    print(0)
else:
    for i in A:
        answer *= i
    if answer > 10**18:
        print(-1)
    else:
        print(answer)

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

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
    if answer > 10**18:
      answer = -1
      break
  print(answer)

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

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
    if answer > 10**18:
      print(-1)
      exit()
	print(answer)

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

answer = 1
if 0 in A:
  print(0)
else:
  for i in A:
    answer *= i
    if answer > 10**18:
      answer = -1
      break
  print(answer)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

for i in range(len(s) + 1):
  if s[i] == t[i]:
    print("Yes")
    break
  else:
    print("No")
    


Fixed submission:
s = input()
t = input()

if s == t[:-1]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a , b , c , k = map(int, input().split())

if  a + b = k:
  print(a)
else:
  print(2*a - k + b)



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

if  a > k:
  print(k)
elif a + b >= k:
  print(a)
else:
  print(2*a - k + b)

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

lst_1 = [1] * a
lst_2 = [0] * b
lst_3 = [-1] * c
lst_1.extend(lst_2)
lst_1.extend(lst_3)

ans = sum(lst_1[0:k])
print(ans)


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

if  a > k:
  print(k)
elif a + b >= k:
  print(a)
else:
  print(2*a - k + b)
Buggy python submission (verdict: Runtime Error):
a = input()
if a = 'ABC':
  print('ARC')
else:
  print('ABC')
  

Fixed submission:
a = input()
if a == 'ABC':
  print('ARC')
elif a == 'ARC':
  print('ABC')
Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = map(int, input().split())

if k == 1:
  print("OK")
  exit()
else:
  for i in range(a, b):
    if i % k == 0:
      ans = "OK"
      break
    else:
      ans = "NG"
print(ans)

Fixed submission:
k = int(input())
a, b = map(int,input().split())
for i in range(a, b + 1):
  if i % k == 0:
    print("OK")
    exit()

print("NG")
Buggy python submission (verdict: Runtime Error):
x = input()
ans = 0
y = x

for i in range(10 ** 18):
  y = 100 ** (1.01 * i)
  if y > x:
    ans += 1
    print(ans)
  	

Fixed submission:
x = int(input())
y = 100
ans = 0

while y < x:
  ans += 1
  y = y * 101 // 100
  
print(ans)
Buggy python submission (verdict: Runtime Error):
h, w =map(int,input().split())

if h == 1 or w == 1:
  print(1)
else:
  if (h * w) % 2 == 0:
    print((h * w) // 2)
  elif:
    print(((h * W) // 2) + 1)
  


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

if h == 1 or w == 1:
  print(1)
else:
  if (h * w) % 2 == 0:
    print((h * w) // 2)
  else:
    print(((h * w) // 2) + 1)

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

if h == 1 or w == 1:
  print(1)
elif (h * w) % 2 == 0:
  print((h * w) // 2)
elif (h * w) % 2 == 1:
  print(((h * W) // 2) + 1)
  


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

if h == 1 or w == 1:
  print(1)
else:
  if (h * w) % 2 == 0:
    print((h * w) // 2)
  else:
    print(((h * w) // 2) + 1)

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

if h == 1 or w ==1:
  print(1)
  break

if (h * w) % 2 == 0:
  print((h * w) // 2)
elif (h * w) % 2 == 1:
  print(((h * W) // 2) + 1)
  


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

if h == 1 or w == 1:
  print(1)
else:
  if (h * w) % 2 == 0:
    print((h * w) // 2)
  else:
    print(((h * w) // 2) + 1)

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

if (h * w) % 2 == 0:
  print((h * w) // 2)
elif (h * w) % 2 == 1:
  print(((h * W) // 2) + 1)
  


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

if h == 1 or w == 1:
  print(1)
else:
  if (h * w) % 2 == 0:
    print((h * w) // 2)
  else:
    print(((h * w) // 2) + 1)

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

if (h * w) % 2 == 0:
  print((h * w) // 2)
else:
  print(((h * W) // 2) + 1)
  

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

if h == 1 or w == 1:
  print(1)
else:
  if (h * w) % 2 == 0:
    print((h * w) // 2)
  else:
    print(((h * w) // 2) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())

if a == 0 and b == 0:
  print(a, b)
  exit()

ans = 0
while a >= 1:
  for i in range(k - 1):
    a -= 1
    ans += 1
if b >= 1:
  for i in range(k - ans):
    b -= 1
    
print(a, b)

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

if a >= k:
  print(a - k, b)
elif a < k and b > k - a:
  print(0, (b - k + a))
else:
  print(0,0)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())

if n == 1:
    print(m)
    exit()
a = []
for i in range(1, m // n + 1):
    if m % n == 0:
        print(m // n)
        exit()
    if m % i == 0:
        a.append(i)

print(max(a))


Fixed submission:
import math
n, m = map(int, input().split())

if n == 1:
    print(m)
    exit()
a = []
b = []
for i in range(1, math.ceil(math.sqrt(m))):
    if m % n == 0:
        print(m // n)
        exit()
    if m % i == 0:
        b.append(i)
        b.append(m // i)
        
#print(b)

for i in range(len(b)):
    if b[i] * n <= m:
        a.append(b[i])
#print(a)

if len(b) == 2:
    print(1)
else:
    print(max(a))

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())

if n == 1:
    print(m)
    exit()
a = []
for i in range(1, m):
    if m % n == 0:
        print(m // n)
        exit()
    if i * n <= m and m % i == 0:
        a.append(i)

print(max(a))


Fixed submission:
import math
n, m = map(int, input().split())

if n == 1:
    print(m)
    exit()
a = []
b = []
for i in range(1, math.ceil(math.sqrt(m))):
    if m % n == 0:
        print(m // n)
        exit()
    if m % i == 0:
        b.append(i)
        b.append(m // i)
        
#print(b)

for i in range(len(b)):
    if b[i] * n <= m:
        a.append(b[i])
#print(a)

if len(b) == 2:
    print(1)
else:
    print(max(a))

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())

if n == 1:
    print(m)
    exit()
a = []
for i in range(1, m):
    if m % n == 0:
        print(m // n)
        exit()
    if m % i == 0 and i * n <= m:
        a.append(i)

print(max(a))


Fixed submission:
import math
n, m = map(int, input().split())

if n == 1:
    print(m)
    exit()
a = []
b = []
for i in range(1, math.ceil(math.sqrt(m))):
    if m % n == 0:
        print(m // n)
        exit()
    if m % i == 0:
        b.append(i)
        b.append(m // i)
        
#print(b)

for i in range(len(b)):
    if b[i] * n <= m:
        a.append(b[i])
#print(a)

if len(b) == 2:
    print(1)
else:
    print(max(a))

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

a = []
for i in range(1, m):
    if m % n == 0:
        print(m // n)
        exit()
    if m % i == 0 and i * n <= m:
        a.append(i)

print(max(a))


Fixed submission:
import math
n, m = map(int, input().split())

if n == 1:
    print(m)
    exit()
a = []
b = []
for i in range(1, math.ceil(math.sqrt(m))):
    if m % n == 0:
        print(m // n)
        exit()
    if m % i == 0:
        b.append(i)
        b.append(m // i)
        
#print(b)

for i in range(len(b)):
    if b[i] * n <= m:
        a.append(b[i])
#print(a)

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

if a - d <= c <= a + d:
  print("Yes"):
elif a - d <= b <= a + d and c - d <= b <= c + d:
  print("Yes")
else:
  print("No")
  

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

if a - d <= c <= a + d:
  print("Yes")
elif a - d <= b <= a + d and c - d <= b <= c + d:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
def dis(xa,ya):
  return abs(xa - 1) + abs(ya - 1)

n = int(input())
ans = 2*n
i = 1
while i*i <= n:
	if (n % i == 0):
      ans = min(ans,dis(i,n//i))
    i += 1
print(ans)

Fixed submission:
def dis(xa,ya):
    return abs(xa - 1) + abs(ya - 1)

n = int(input())
ans = 2*n
i = 1
while i*i <= n:
    if (n % i == 0):
        ans = min(ans, dis(i,n//i))
    i += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = int(input())

print(max(a + b,a - b,a*b))

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

print(max(a + b,a - b, a*b))
Buggy python submission (verdict: Runtime Error):
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
s = input()
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
ls = [int(i) for i in input().split()]
if len(ls) == 1:
  print(ls[0]*2)
else:
  als = [ls[0]]
  for n in range(1, N-1):
    als.append(min(ls[n-1], ls[n]))
  als.append(ls[-1])
  print(sum(als))

Fixed submission:
n = int(input())
print(n*n*n)

Buggy python submission (verdict: Runtime Error):
n = int(input)
print(n*n*n)

Fixed submission:
n = int(input())
print(n*n*n)
Buggy python submission (verdict: Runtime Error):
input_data = input().split("\n")
N = int(input_data[0])
ls = [int(b) for b in input_data[1].split()]
if len(ls) == 1:
  print(ls[0]*2)
else:
  first = ls[0]
  als = [ls[0]]

  for n in range(1, N-1):
    als.append(min(ls[n-1], ls[n]))
  als.append(ls[-1])
  print(sum(als))

Fixed submission:
N = int(input())
ls = [int(i) for i in input().split()]
if len(ls) == 1:
  print(ls[0]*2)
else:
  als = [ls[0]]
  for n in range(1, N-1):
    als.append(min(ls[n-1], ls[n]))
  als.append(ls[-1])
  print(sum(als))

Buggy python submission (verdict: Runtime Error):
input_data = input().split("\n")
N = int(input_data[0])
ls = [int(b) for b in input_data[1]]
if len(ls) == 1:
  print(ls[0]*2)

first = ls[0]
als = [ls[0]]

for n in range(1, N-1):
  als.append(min(ls[n-1], ls[n]))
als.append(ls[-1])
print(sum(als))

Fixed submission:
N = int(input())
ls = [int(i) for i in input().split()]
if len(ls) == 1:
  print(ls[0]*2)
else:
  als = [ls[0]]
  for n in range(1, N-1):
    als.append(min(ls[n-1], ls[n]))
  als.append(ls[-1])
  print(sum(als))