Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
li = str.split()
if(eval(li[0])<=eval(li[1])):
  print("unsafe")
else:
  print("safe")

Fixed submission:
str = input("")
li = str.split()
if(eval(li[0])<=eval(li[1])):
  print("unsafe")
else:
  print("safe")

Buggy python submission (verdict: Runtime Error):
w=eval(input())
s=eval(input())
if(w>=s):
  print("unsafe")
else:
  print("safe")

Fixed submission:
str = input("")
li = str.split()
if(eval(li[0])<=eval(li[1])):
  print("unsafe")
else:
  print("safe")

Buggy python submission (verdict: Runtime Error):
w=eval(input(""))
s=eval(input(""))
if w>=s:
  print("unsafe")
else:
  print("safe")

Fixed submission:
str = input("")
li = str.split()
if(eval(li[0])<=eval(li[1])):
  print("unsafe")
else:
  print("safe")

Buggy python submission (verdict: Runtime Error):
w=eval(input(""))
s=eval(input(""))
if(w>=s):
  print("unsafe")
else:
  print("safe")

Fixed submission:
str = input("")
li = str.split()
if(eval(li[0])<=eval(li[1])):
  print("unsafe")
else:
  print("safe")
Buggy python submission (verdict: Runtime Error):
items=list(input().split())
    T_health=int(items[0])
    T_strength=int(items[1])
    A_health=int(items[2])
    A_strength=int(items[3])
    while(T_health>0 and A_health>0):
        A_health-=T_strength
        if(A_health>0):
            T_health-=A_strength
    if(T_health<=0):
        print("No")
    if(A_health<=0):
        print("Yes")

Fixed submission:
def solve():
    items=list(input().split())
    T_health=int(items[0])
    T_strength=int(items[1])
    A_health=int(items[2])
    A_strength=int(items[3])
    while(T_health>0 and A_health>0):
        A_health-=T_strength
        if(A_health>0):
            T_health-=A_strength
    if(T_health<=0):
        print("No")
    if(A_health<=0):
        print("Yes")
    return
solve()

Buggy python submission (verdict: Runtime Error):
items=list(input.split())
    T_health=int(items[0])
    T_strength=int(items[1])
    A_health=int(items[2])
    A_strength=int(items[3])
    while(T_health>0 and A_health>0):
        A_health-=T_strength
        if(A_health>0):
            T_health-=A_strength
    if(T_health<=0):
        print("No")
    if(A_health<=0):
        print("Yes")

Fixed submission:
def solve():
    items=list(input().split())
    T_health=int(items[0])
    T_strength=int(items[1])
    A_health=int(items[2])
    A_strength=int(items[3])
    while(T_health>0 and A_health>0):
        A_health-=T_strength
        if(A_health>0):
            T_health-=A_strength
    if(T_health<=0):
        print("No")
    if(A_health<=0):
        print("Yes")
    return
solve()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
s = list(map(int, input().split()))
flag =0

for i in s:
  if s.count(i) == 2:
    flag = 1
    break
print("YES") if flag == 0 else print("NO")


Fixed submission:
N = int(input())
s = list(map(int, input().split()))
flag =0
s.sort()

for i in range(0, N-1):
  if s[i] == s[i+1]:
    flag = 1
    break
print("YES") if flag == 0 else print("NO")
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
print("Yes") if n == M else print("No")

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

print("Yes") if M == N else print("No")
Buggy python submission (verdict: Runtime Error):
t,n=map(int,input().split())
print(t/x)

Fixed submission:
t,x=map(int,input().split())
print(t/x)
Buggy python submission (verdict: Runtime Error):
x=int,input()
print(x//3)

Fixed submission:
x=int(input())
print(x//3)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split(''))
print('Yes' if a==c==b or b==c==d else 'No')

Fixed submission:
a,b,c,d=map(int,input())
print('Yes' if a==c==b or b==c==d else 'No')
Buggy python submission (verdict: Runtime Error):
n,m = input().split()

int(n)
int(m)


print((m-1)*(n-1))

Fixed submission:
n,m = input().split()

n = int(n)
m = int(m)


print((m-1)*(n-1))

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

int(n)
int(m)


print(m*n)

Fixed submission:
n,m = input().split()

n = int(n)
m = int(m)


print((m-1)*(n-1))

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


print(m*n)

Fixed submission:
n,m = input().split()

n = int(n)
m = int(m)


print((m-1)*(n-1))

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

print(m*n)

Fixed submission:
n,m = input().split()

n = int(n)
m = int(m)


print((m-1)*(n-1))
Buggy python submission (verdict: Runtime Error):
a,b,c=input().split()
print('YES' if a[-1]==b[1] and b[-1]==c[1] else 'NO')

Fixed submission:
a,b,c=input().split()
print('YES' if a[-1]==b[0] and b[-1]==c[0] else 'NO')

Buggy python submission (verdict: Runtime Error):
a,b,c=input().split()
print('YES' if a[::-1]==b[1] and b[::-1]==c[1] else 'NO')

Fixed submission:
a,b,c=input().split()
print('YES' if a[-1]==b[0] and b[-1]==c[0] else 'NO')
Buggy python submission (verdict: Runtime Error):
import math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]t[1]*math.cos(angle(2*math.pi/360))))


Fixed submission:
import math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]*t[1]*math.cos(angle*(2*math.pi/360))))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
A = []

for i in range(K):
  d = int(input())
  a = list(map(int, input().split()))
  A.append(a)

ref = A[0]

for i in range(1, K):
  ref = list(set(ref) & set(A[i])) + list(set(ref) ^ set(A[i]))

len = len(ref)

print(N - len)

Fixed submission:
S = input()

if S[1] == 'B':
  print('ARC')

if S[1] == 'R':
  print('ABC')
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
sum = 0
height = list(map(int, input().split()))
road = []
for i in range(M):
  R = list(map(int, input().split()))
  road.append(R)

for i in range(N):#0~N-1
  p = 0
  s = 0
  for j in range(M):#0~M-1
    if road[j][0] - 1 == i or road[j][1] - 1 == i: 
      s += 1
      if height[road[j][1] - 1] >= height[i] and height[road[j][0] - 1] >= height[i]:
        p += 1
    
  if p == 0 or s == 0:
    sum += 1
print(sum)

Fixed submission:
N, M = map(int, input().split())
sum = 0
height = list(map(int, input().split()))
road = []
for i in range(M):
  R = list(map(int, input().split()))
  road.append(R)

other = []

for i in range(N):
  other.append([0])

for i in range(M):
  other[road[i][0] - 1].append(height[road[i][1] - 1])
  other[road[i][1] - 1].append(height[road[i][0] - 1])
for i in range(N):
  if height[i] > max(other[i]):
    sum += 1

print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
sum = 0
height = list(map(int, input().split()))
road = []
for i in range(M):
  R = list(map(int, input().split()))
  road.append(R)

for i in range(N):#0~N-1
  p = 0
  s = 0
  for j in range(M):#0~M-1
    if road[j][0] - 1 == i:
      s += 1
      if height[road[j][1] - 1] >= height[i]:
        p += 1
    if road[j][1] - 1 == i:
      s += 1
      if height[road[j][0] - 1] >= height[i]:
        p += 1

  if p == 0 or s == 0:
    sum += 1
    
print(sum)

Fixed submission:
N, M = map(int, input().split())
sum = 0
height = list(map(int, input().split()))
road = []
for i in range(M):
  R = list(map(int, input().split()))
  road.append(R)

other = []

for i in range(N):
  other.append([0])

for i in range(M):
  other[road[i][0] - 1].append(height[road[i][1] - 1])
  other[road[i][1] - 1].append(height[road[i][0] - 1])
for i in range(N):
  if height[i] > max(other[i]):
    sum += 1

print(sum)
Buggy python submission (verdict: Runtime Error):
N = int(input())

hyaku = N // 100
resi = N - (100 * hyaku)
ju = resi // 10
iti = resi % 10

n = hyaku * ju * iti

if n % 7 == 0:
  print('Yes')

else:
  print('No')

N = int(input())

Fixed submission:
N = int(input())

hyaku = N // 100
resi = N - (100 * hyaku)
ju = resi // 10
iti = resi % 10

n = hyaku * ju * iti

if not hyaku == 7:
  if not ju == 7:
    if not iti == 7:
      print('No')
    else:
      print('Yes')
  else:
    print('Yes')
else:
  print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
import math
K = int(input())
sum = 0

for i in range(1, K + 1):
  for j in range(1, K + 1):
    for k in range(1, K + 1):
      gcd1 = math.gcd(j, k)
      gcd2 = math.gcd(i, gcd1)
      sum += gcd2

print(sum)

Fixed submission:
import math
K = int(input())
sum = 0

for i in range(1, K + 1):
  for j in range(1, K + 1):
    gcd1 = math.gcd(i, j)
    for k in range(1, K + 1):
      gcd2 = math.gcd(k, gcd1)
      sum += gcd2

print(sum)
Buggy python submission (verdict: Runtime Error):
S = input()

if S[2] = S[3]:
  if S[4] = S[5]:
    print('Yes')
  else:
    print('No')

else:
  print('No')

Fixed submission:
S = input()

if S[2] == S[3]:
  if S[4] == S[5]:
    print('Yes')
  else:
    print('No')

else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
def sta(n):
  one = 1
  for i in range(1, n + 1):
    one *= i
  return one

if N >= 3:
  num = sta(N)/(sta(2)*sta(N-2))
if N = 2:
  num = 1
if N <= 1:
  num = 0

if M >= 3:
  mum = sta(N)/(sta(2)*sta(N-2))
if M = 2:
  mum = 1
if M <= 1:
  mum = 0

print(num + mum)


Fixed submission:
N, M = map(int, input().split())
def sta(n):
  one = 1
  for i in range(1, n + 1):
    one *= i
  return one

if N >= 3:
  num = sta(N)/(sta(2)*sta(N-2))
if N == 2:
  num = 1
if N <= 1:
  num = 0

if M >= 3:
  mum = sta(M)/(sta(2)*sta(M-2))
if M == 2:
  mum = 1
if M <= 1:
  mum = 0

print(int(num + mum))
Buggy python submission (verdict: Runtime Error):
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []

for i in range(N):
  kai.append(S[i])

for i in range(1, ((N - 1) / 2 + 1)):
  kai2.append(S[i])

for i in range(((N + 3) / 2), N + 1):
  kai3.append(S[i])

rev = kai.reverse
rev2 = kai2.reverse
rev3 = kai3.reverse

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')


Fixed submission:
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []
rev = []
rev2 = []
rev3 = []

for i in range(N):
  kai.append(S[i])

for i in range(0, int((N - 1) / 2)):
  kai2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  kai3.append(S[i])

kai.reverse()
kai2.reverse()
kai3.reverse()

for i in range(N):
  rev.append(S[i])

for i in range(0, int((N - 1) / 2)):
  rev2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  rev3.append(S[i])

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []

for i in range(N):
  kai.append(S[i])

for i in range(1, ((N - 1) / 2 + 1)):
  kai2.append(S[i])

for i in range(((N + 3) / 2), N + 1):
  kai3.append(S[i])

rev = kai.reverse
rev2 = kai2.reverse
rev3 = kai3.reverse

if kai == rev:
  if kai2 = rev2:
    if kai3 = rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Fixed submission:
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []
rev = []
rev2 = []
rev3 = []

for i in range(N):
  kai.append(S[i])

for i in range(0, int((N - 1) / 2)):
  kai2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  kai3.append(S[i])

kai.reverse()
kai2.reverse()
kai3.reverse()

for i in range(N):
  rev.append(S[i])

for i in range(0, int((N - 1) / 2)):
  rev2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  rev3.append(S[i])

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
K = int(input())
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[K])

Fixed submission:
K = int(input())
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[(K-1)])

Buggy python submission (verdict: Runtime Error):
K = int(input())
l = [1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51]

print(l[K])

Fixed submission:
K = int(input())
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[(K-1)])
Buggy python submission (verdict: Runtime Error):
H, M = map(int,input().split())
l = [H, M]

max = max(l)
min = min(l)

if max == min:
  if max % 2 == 0:
    N = (H * M) / 2
  else:
    N = ((H * M) - 1)/2)+1

else:
  r = max - min
  r2 = max - r
  r3 = r * min
  if r2 % 2 == 0:
    n1 = (r2 * r2) / 2
  else:
    n1 = (((r2 * r2) - 1)/2)+1
 
  if r3 % 2 == 0:
    n2 = r3 / 2
  else:
    n2 = (r3 - 1) / 2

  N = n1 + n2

print(N)

Fixed submission:
H, M = map(int,input().split())
l = [H, M]

max = max(l)
min = min(l)

if min == 1:
  N = 1
  
else:
  if max == min:
    if max % 2 == 0:
      N = (H * M) / 2
    else:
      N = (((H * M) - 1)/2)+1

  else:
    r = max - min
    r2 = max - r
    r3 = r * min
    if r2 % 2 == 0:
      n1 = (r2 * r2) / 2
    else:
      n1 = (((r2 * r2) - 1)/2)+1
 
    if r3 % 2 == 0:
      n2 = r3 / 2
    else:
      n2 = (r3 - 1) / 2

    N = n1 + n2
    
print(int(N))

Buggy python submission (verdict: Runtime Error):
H, M = map(int,input().split())
l = [H, M]

max = max(l)
min = min(l)

if max == min:
  if max % 2 == 0:
    N = (H * M) / 2
  else:
    N = ((H * M) - 1)/2)+1

else:
  r = max - min
  r2 = max - r
  r3 = r * min
  if r2 % 2 == 0:
    n1 = (r2 * r2) / 2
  else:
    n1 = (((r2 * r2) - 1)/2)+1
 
  if r3 % 2 == 0:
    n2 = r3 / 2
  else:
    n2 = (r3 - 1) / 2

  N = n1 + n2

print(N)

Fixed submission:
H, M = map(int,input().split())
l = [H, M]

max = max(l)
min = min(l)

if min == 1:
  N = 1
  
else:
  if max == min:
    if max % 2 == 0:
      N = (H * M) / 2
    else:
      N = (((H * M) - 1)/2)+1

  else:
    r = max - min
    r2 = max - r
    r3 = r * min
    if r2 % 2 == 0:
      n1 = (r2 * r2) / 2
    else:
      n1 = (((r2 * r2) - 1)/2)+1
 
    if r3 % 2 == 0:
      n2 = r3 / 2
    else:
      n2 = (r3 - 1) / 2

    N = n1 + n2
    
print(int(N))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
m = c - a - b

if m <= 0:
 　print('No')

else:
  X = ((c - a - b)^2) - (4 * a * b)
  if X > 0:
    print('Yes')
  else:
    print('No')

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

if m <= 0:
  print('No')

else:
  X = (m * m) - (4 * a * b)
  if X > 0:
    print('Yes')
  else:
    print('No')
Buggy python submission (verdict: Runtime Error):
A,B,M = map(int, input().split())

la = list(map(int, input().split()))
lb = list(map(int, input().split()))

d = []
for i in range(M):
  d.append(list(map(int, input().split())))
           
for i in range(M):
  d[i] = la[(d[i][0]-1)] + lb[(d[i][1]-1)] - d[i][2]
  
o = min(la) + min(lb)
d.append(o)

print(min(d))

Fixed submission:
h = input()
l = len(h)
n = 0
hitachi = False

if l % 2 == 1:
  hitachi = False
  
else:
  m = int(l / 2)
  for i in range(m):
    if h[(2 * i)] == "h":
      n += 1
    if h[(2 * i)+1] == "i":
      n += 1
  
  if n == l:
    hitachi = True
  else:
    hitachi = False
    
if hitachi:
  print("Yes")
else:
  print("No")

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

la = list(map(int, input().split()))
lb = list(map(int, input().split()))

d = []
for i in range(M):
  d.append(list(map(int, input().split())))
           
for i in range(M):
  d[i] = la[(d[i][0]-1)] + lb[(d[i][1]-1)] - d[i][2]

print(min(d))

Fixed submission:
h = input()
l = len(h)
n = 0
hitachi = False

if l % 2 == 1:
  hitachi = False
  
else:
  m = int(l / 2)
  for i in range(m):
    if h[(2 * i)] == "h":
      n += 1
    if h[(2 * i)+1] == "i":
      n += 1
  
  if n == l:
    hitachi = True
  else:
    hitachi = False
    
if hitachi:
  print("Yes")
else:
  print("No")

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

la = list(map(int, input().split()))
lb = list(map(int, input().split()))

d = []
for i in range(M):
  d.append(list(map(int, input().split())))
           
for i in range(M):
  d[i] = la[(d[i][0]-1)] + lb[(d[i][1]-1)] - d[i][2]

print(min(d))

Fixed submission:
h = input()
l = len(h)
n = 0
hitachi = False

if l % 2 == 1:
  hitachi = False
  
else:
  m = int(l / 2)
  for i in range(m):
    if h[(2 * i)] == "h":
      n += 1
    if h[(2 * i)+1] == "i":
      n += 1
  
  if n == l:
    hitachi = True
  else:
    hitachi = False
    
if hitachi:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
p = int(math.sqrt(A))
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,int(A/i)]
        all_lis.append(kumi)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))

Fixed submission:
import math
A = int(input())
p = int(math.sqrt(A)) + 1
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,int(A/i)]
        all_lis.append(kumi)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))

Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
p = int(math.sqrt(A))
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,int(A/i)]
        all_lis.append(kumi)
        
print(all_lis)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))

Fixed submission:
import math
A = int(input())
p = int(math.sqrt(A)) + 1
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,int(A/i)]
        all_lis.append(kumi)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))

Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
p = int(math.sqrt(A))
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,A/i]
        all_lis.append(kumi)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))

Fixed submission:
import math
A = int(input())
p = int(math.sqrt(A)) + 1
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,int(A/i)]
        all_lis.append(kumi)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))
tri = 0
ran = list(range(N-2))

for i in ran:
    for j in ran:
        for k in range(N-2-i-j):
            if ((L[i] + L[i+j+1]) > L[i+j+k+2]) and ((L[i] + L[i+j+k+2]) > L[i+j+1]) and ((L[i+j+k+2] + L[i+j+1]) > L[i]):
                tri += 1
print(tri)

Fixed submission:
MK = input()
mado = int(MK.split(" ")[0])
katen = int(MK.split(" ")[1])
 
n = mado - (katen*2)
 
if n >= 0:
  print(n)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
mado = int(input())
ka-ten = int(input())
 
n = mado - (ka-ten*2)
 
if n >= 0:
  print(n)
else:
  print(0)

Fixed submission:
MK = input()
mado = int(MK.split(" ")[0])
katen = int(MK.split(" ")[1])
 
n = mado - (katen*2)
 
if n >= 0:
  print(n)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
mado = input()
ka-ten = input()

n = mado - (ka-ten*2)

if n >= 0:
  print(n)
else:
  print(0)

Fixed submission:
MK = input()
mado = int(MK.split(" ")[0])
katen = int(MK.split(" ")[1])
 
n = mado - (katen*2)
 
if n >= 0:
  print(n)
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))
tri = 0
ran = list(range(N-2))

for i in ran:
    for j in ran:
        for k in range(N-2-i-j):
            if ((L[i] + L[i+j+1]) > L[i+j+k+2]) and ((L[i] + L[i+j+k+2]) > L[i+j+1]) and ((L[i+j+k+2] + L[i+j+1]) > L[i]):
                tri += 1
print(tri)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))

def main():
    tri = 0
    L.sort()
    for i in range(N-1,-1,-1): #range(初期値,終了条件,変化量)
        mn = 0
        sl = i-1
        while(mn<sl):
            if (L[mn] + L[sl]) > L[i]:
                tri += sl - mn
                sl -= 1
            else:
                mn += 1
    print(tri)
    
main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
Ls = input().split()
L = [int(s) for s in Ls]
tri = 0

for i in range(N-2):
    for j in range(N-2):
        for k in range(N-2-i-j):
            if ((L[i] + L[i+j+1]) > L[i+j+k+2]) and ((L[i] + L[i+j+k+2]) > L[i+j+1]) and ((L[i+j+k+2] + L[i+j+1]) > L[i]):
                tri += 1
print(tri)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))

def main():
    tri = 0
    L.sort()
    for i in range(N-1,-1,-1): #range(初期値,終了条件,変化量)
        mn = 0
        sl = i-1
        while(mn<sl):
            if (L[mn] + L[sl]) > L[i]:
                tri += sl - mn
                sl -= 1
            else:
                mn += 1
    print(tri)
    
main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
Ls = input().split()
L = [int(s) for s in Ls]
tri = 0

for i in range(N-2):
    for j in range(N-2):
        for k in range(N-2-i-j):
            if ((L[i] + L[i+j+1]) > L[i+j+k+2]) and ((L[i] + L[i+j+k+2]) > L[i+j+1]) and ((L[i+j+k+2] + L[i+j+1]) > L[i]):
                tri += 1
print(tri)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))

def main():
    tri = 0
    L.sort()
    for i in range(N-1,-1,-1): #range(初期値,終了条件,変化量)
        mn = 0
        sl = i-1
        while(mn<sl):
            if (L[mn] + L[sl]) > L[i]:
                tri += sl - mn
                sl -= 1
            else:
                mn += 1
    print(tri)
    
main()
Buggy python submission (verdict: Runtime Error):
W = input()

if W[0] == "S":
  print("Cloudy")
else if W[0] == "C":
  print("Rainy")
else:
  print("Sunny")
  

Fixed submission:
W = input()
 
if W[0] == "S":
  print("Cloudy")
elif W[0] == "C":
  print("Rainy")
else:
  print("Sunny")
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
print("{0:.20f}".format(2*n*math.pi))

Fixed submission:
n,m = map(int,input().split())
a = list(map(int,input().split()))
s = sum(a)
if s>n:
    print(-1)
else:
    print(n-s)
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
 
 
one = a[0]
zero = a[1]
mone = a[2]
num = a[3]
 
ans = 0
if one >= num:
    print(num)
else:
    ans += one
    num -= one
    if zero >= num:
        print(ans)
    else:
        num -= zero
        print(one - num)

Fixed submission:
a = input()
b = input()

a_len = len(a)
b_r = b[:-1]

if b_r == a and a_len <= 10 and a_len >= 1:
 	print("Yes")
else:
	print("No")

Buggy python submission (verdict: Runtime Error):
str = input().split()
a = str[0]
a_len = len(a)
b = str[1]
b_r = str[:-1]


if b_r[0] == a and a_len <= 10 and a_len >= 1:
 	print("Yes")
else:
	print("No")


Fixed submission:
a = input()
b = input()

a_len = len(a)
b_r = b[:-1]

if b_r == a and a_len <= 10 and a_len >= 1:
 	print("Yes")
else:
	print("No")

Buggy python submission (verdict: Runtime Error):
str = input().split()
a = str[0]
a_len = len(a)
b = str[1]
b_r = str[:-1]


if b_r == a and a_len <= 10 and a_len >= 1:
 	print("Yes")
else:
	print("No")

Fixed submission:
a = input()
b = input()

a_len = len(a)
b_r = b[:-1]

if b_r == a and a_len <= 10 and a_len >= 1:
 	print("Yes")
else:
	print("No")