ZhenlongDai/ACPR huggingface dataset:
Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys

n,k = list(map(int, input().split(" ")))
l = list(map(int, input().split(" ")))
l = [999999]*k + l
print(l)
dp= [0]*(n+k)

for i in range( k + 1, n+k):
	dp[i] = min([ dp[i - j] + abs(l[i] - l[i - j]) for j in range(1, k + 1) ])

print(dp[n + k - 1])

Failing test case input:
10 4
40 9 33 70 80 10 20 70 84 31

Expected output:
31


Actual output:
[999999, 999999, 999999, 999999, 40, 9, 33, 70, 80, 10, 20, 70, 84, 31]
31


Fixed submission (verdict: Accepted):
import sys

n,k = list(map(int, input().split(" ")))
l = list(map(int, input().split(" ")))
l = [999999]*k + l
dp= [0]*(n+k)

for i in range( k + 1, n+k):
	dp[i] = min([ dp[i - j] + abs(l[i] - l[i - j]) for j in range(1, k + 1) ])

print(dp[n + k - 1])

Problem: p03161
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k = map(int,input().split())
h = list(map(int,input().split()))

c = []
c.append(0)

for i in range(1,n):
    c.append(min([c[max(i-k,0)]+abs(h[i]-h[max(i-j,0)]) for j in range(1,k+1)]))

print(c)
print(c[n-1])

Failing test case input:
5 1
26 19 34 219 155 10 13 11 20 118

Expected output:
271


Actual output:
[0, 7, 22, 207, 271]
271


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())
h = list(map(int,input().split()))

c = []
c.append(0)

for i in range(1,n):
    c.append(min([ c[max(i-j,0)] + abs(h[i] - h[max(i-j,0)]) for j in range(1,k+1) ]))

print(c[n-1])

Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,K=map(int,input().split())
A=list(map(int,input().split()))
if N==1:
  print(0)
  exit()
if N==2:
  print(abs(A[0]-A[1]))
  exit()
dp=[float("INF")]*(N+1)
dp[0]=0
for i in range(N-K+2):
  for j in range(1,K+1):
    if j+i>=N:
      break
    dp[i+j]=min(abs(A[i+j]-A[i])+dp[i],dp[i+j])
print(dp[N-1])

Failing test case input:
9 6
28 10 1 0 9 27 6 179 223 119

Expected output:
197


Actual output:
233


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
A=list(map(int,input().split()))
dp=[float("INF")]*(N+1)
dp[0]=0
for i in range(N):
  for j in range(1,K+1):
    if j+i>=N:
      break
    dp[i+j]=min(abs(A[i+j]-A[i])+dp[i],dp[i+j])
print(dp[N-1])

Problem: p03161
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N, K = map(int, input().split())
h = list(map(int, input().split()))

dp = [-1] * N
dp[0] = 0

inf = sum(h)

for i in range(1, N):
    mindp_i = inf

    for jump in range(1, min(i, K) + 1):
        dpcand = dp[i - jump] + abs(h[i] - h[i - jump])
        
        if dpcand < mindp_i:
            mindp_i = dpcand

    dp[i] = mindp_i

print(dp[N-1])

Failing test case input:
3 1
0 38 10

Expected output:
66


Actual output:
48


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
h = list(map(int, input().split()))

inf = 10000000000

dp = [inf] * N
dp[0] = 0

for i in range(1, N):
    

    for jump in range(1, K + 1):
        if i - jump >= 0:
            dp[i] = min(dp[i], dp[i - jump] + abs(h[i] - h[i - jump]))

            
            
            
            

    

print(dp[N-1])
Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, K = map(int, input().split())
H = list(map(int, input().split()))

dp = [sum(H) + 1] * N
dp[0] = 0

for i in range(1, N):
    for j in range(max(0, i-K), i):
        dp[i] = min(dp[i], dp[j] + abs(H[i] - H[j]))

print(dp[-1])

Failing test case input:
5 1
10 30 7 69 2

Expected output:
172


Actual output:
119


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
H = [0] + list(map(int, input().split()))

dp = [10 ** 10] * (N+1)
dp[1] = 0

for i in range(1, N+1):
    for j in range(1, K+1):
        if i + j > N:
            continue
        dp[i+j] = min(dp[i+j], dp[i] + abs(H[i+j] - H[i]))

print(dp[N])

Problem: p03161
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def func():
    N, k = map(int, input().split() )
    h = list( map(int,input().split()) )

    dp = [float('inf')] * N
    dp[0] = 0
    for n in range(1, N):
        
        
        
        
        
        
        dp[n] = min([ dp[max(n-k,0)] + abs(h[n]-h[max(n-k,0)]) for k in range(max(n-k,0), n) ])
    print(dp[N-1])

if __name__=='__main__':
    func()





Failing test case input:
2 100
7 10

Expected output:
3


Actual output:
inf


Fixed submission (verdict: Accepted):


def func():
    N, k = map(int, input().split() )
    h = list( map(int,input().split()) )

    dp = [float('inf')] * N
    dp[0] = 0
    for n in range(1, N):
        
        
        
        
        
        
        dp[n] = min([ dp[j] + abs(h[n]-h[j]) for j in range(max(n-k,0), n) ])
    print(dp[N-1])

if __name__=='__main__':
    func()

Problem: p03161
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N,K=map(int,input().split())
h_list=list(map(int,input().split()))
dp=[0]*N
for i in range(1,N):
    dp[i]=float("inf")
    for j in range(1,min(i,K+1)+1):
        dp[i]=min(dp[i],dp[i-j]+abs(h_list[i-j]-h_list[i]))
print(dp)

Failing test case input:
5 5
41 10 14 73 80 21 9 91 121 60

Expected output:
39


Actual output:
[0, 31, 27, 32, 39]


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
h_list=list(map(int,input().split()))
dp=[0]*N
for i in range(1,N):
    dp[i]=float("inf")
    for j in range(1,min(i,K)+1):
        dp[i]=min(dp[i],dp[i-j]+abs(h_list[i-j]-h_list[i]))
print(dp[-1])

Problem: p03161
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
	n, k = map(int, input().split())
	costs = list(map(int, input().split()))
	v= [0] * n
	for step in range(1, n):
		v[step] = min([v[j] + abs(costs[step]-costs[step-j]) for j in range(max(0,step-k), step)])
	return v[-1]
print(main())


Failing test case input:
7 4
40 9 20 70 80 9 43 70 135 60

Expected output:
43


Actual output:
23


Fixed submission (verdict: Accepted):
def main():
	n, k = map(int, input().split())
	costs = list(map(int, input().split()))
	v= [0] * n
	for step in range(1, n):
		v[step] = min([v[j] + abs(costs[step]-costs[j]) for j in range(max(0,step-k), step)])
	return v[-1]
print(main())
Problem: p03161
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
h = list(map(int, input().split()))

dp = [0]*n

dp[1] = abs(h[1]-h[0])
for i in range(2, n):
  dp[i] = min([dp[i-1]+abs(h[i]-h[i-1]) for i in range(1,min(i+1,k+1))])
  
   
    
    
    

print(dp[-1])

Failing test case input:
6 1
41 19 34 219 155 10 13 11 80 118

Expected output:
431


Actual output:
22


Fixed submission (verdict: Accepted):
def main():
  n, k = map(int, input().split())
  h = [int(n) for n in input().split()]
  dp = [0]*n
  for i in range(1, n):
    dp[i] = min([dp[j]+abs(h[i]-h[j]) for j in range(max(0,i-k),i)])  
  print(dp[-1])

if __name__ == "__main__":
  main()

Problem: p03161
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = map(int,input().split())
h = list(map(int,input().split()))

cost = [0]
for i in range(2,N+1):
    print(i)
    cost.append( min([cost[j] + abs(h[i-1]-h[j]) for j in range(max(0,i-K-1), i-1)]) )
print(cost[-1])

Failing test case input:
5 1
27 26 59 86 290 10 13 20 39 84

Expected output:
265


Actual output:
2
3
4
5
265


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
h = list(map(int,input().split()))

cost = [0]
for i in range(2,N+1):
    cost.append( min([cost[j] + abs(h[i-1]-h[j]) for j in range(max(0,i-K-1), i-1)]) )
print(cost[-1])

Problem: p03161
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k = map(int,input().split())
h = list(map(int,input().split()))

c = []
c.append(0)

for i in range(1,n):
    c.append(min([c[max(i-k,0)]+abs(h[i]-h[max(i-j,0)]) for j in range(1,k+1)]))

print(c[n-1])

Failing test case input:
10 4
40 9 33 70 80 10 20 70 84 31

Expected output:
31


Actual output:
43


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())
h = list(map(int,input().split()))

c = []
c.append(0)

for i in range(1,n):
    c.append(min([ c[max(i-j,0)] + abs(h[i] - h[max(i-j,0)]) for j in range(1,k+1) ]))

print(c[n-1])

Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, K = map(int, input().split())
h_s = list(map(int, input().split()))+[0]*K

dp = [float("inf")]*(N+K)
dp[0] = 0

for i in range(N):
    for j in range(K):
        dp[i+j] = min(dp[i+j], dp[i]+abs(h_s[i]-h_s[i+j]))

print(dp[N-1])

Failing test case input:
5 3
10 40 64 46 24

Expected output:
46


Actual output:
58


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
h_s = list(map(int, input().split()))+[0]*K

dp = [float("inf")]*(N+K)
dp[0] = 0
 
for i in range(N):
    for j in range(1, K+1):
        dp[i+j] = min(dp[i+j], dp[i]+abs(h_s[i]-h_s[i+j]))
 
print(dp[N-1])
Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, k = map(int, input().split())
l = list(map(int, input().split()))

dp = [float('inf') for _ in range(n)]
dp[0] = 0

for i in range(n-1):
    for j in range(1, k+1):
        if i+j <= n-1:
            temp = dp[i] + abs(l[i+j] - l[i])
            if dp[i] + temp < dp[i+j]:
                dp[i+j] = temp

print(dp[-1])

Failing test case input:
10 4
40 9 20 70 80 10 20 70 80 60

Expected output:
40


Actual output:
60


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
l = list(map(int, input().split()))

dp = [float('inf') for _ in range(n)]
dp[0] = 0

for i in range(n-1):
    for j in range(1, k+1):
        if i+j <= n-1:
            temp = dp[i] + abs(l[i+j] - l[i])
            if temp < dp[i+j]:
                dp[i+j] = temp

print(dp[-1])

Problem: p03161
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k= map(int,input().split())
h = [int(i) for i in input().split()]
inf = 10**7
dp = [inf]*100005
dp[0] = 0
for i in range(1,n):
    con = inf
    for j in range(1,k):
        if j > len(h):
            break
        con = min(con,dp[i-j]+abs(h[i]-h[i-j]))
        if abs(h[i]-h[i-j]) == 0:
            break
    dp[i] = con
print(dp[n-1])

Failing test case input:
5 1
65 19 34 219 208 10 13 13 39 118

Expected output:
257


Actual output:
10000000


Fixed submission (verdict: Accepted):
def main():
    n,k= map(int,input().split())
    h = [int(i) for i in input().split()]
    inf = 10**7
    dp = [inf]*100005
    dp[0] = 0
    for i in range(1,n):
        dp[i] = min(dp[i-j] + abs(h[i-j] - h[i]) for j in range(1,min(k,i)+1))
    print(dp[n-1])
main()

Problem: p03161
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,aa=map(int,input().split())
b=list(map(int,input().split()))
c=[float("inf") for i in range(a)]
c[0]=0
for i in range(1,a):
  c[i] = min(c[j] + abs(b[i] - b[j]) for j in range(max(0,i-aa),i))
print(c)
print(c[-1])

Failing test case input:
3 1
1 20 10

Expected output:
29


Actual output:
[0, 19, 29]
29


Fixed submission (verdict: Accepted):
def solve():
  a,aa=map(int,input().split())
  b=list(map(int,input().split()))
  c=[0]*a
  c[0]=0
  for i in range(1,a):
    c[i] = min(c[j] + abs(b[i] - b[j]) for j in range(max(0,i-aa),i))
  print(c[-1])
  
solve()

Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

n,k=map(int,input().split())
a=[int(i) for i in input().split()]
dp=[0]*n
dp[1]=abs(a[1]-a[0])
for i in range(2,n):
    for j in range(1,k+1):
        dp[i]=min(dp[i-j]+abs(a[i]-a[i-j]),dp[i])
print(dp[-1])

Failing test case input:
5 1
47 14 99 86 208 10 13 20 61 97

Expected output:
253


Actual output:
0


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
a=[int(i) for i in input().split()]
dp=[10**9]*n
dp[0]=0
dp[1]=abs(a[1]-a[0])
for i in range(2,n):
    for j in range(max(0,i-k),i):
        dp[i]=min(dp[j]+abs(a[i]-a[j]),dp[i])
print(dp[-1])
Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k = map(int, input().split())
h = list(map(int, input().split()))

dp = [0]*(n-1)

for i in range(1,n-1):
    temp = 10**10
    for j in range(1, min(k+1, i+1) ):
        temp = min(temp, abs(h[i] - h[i-j]) + dp[i-j])
    dp[i] = temp

print(dp[n-2])

Failing test case input:
6 1
40 18 34 219 155 10 20 11 80 98

Expected output:
432


Actual output:
287


Fixed submission (verdict: Accepted):
n,k = map(int, input().split())
h = list(map(int, input().split()))

dp = [0]*n

for i in range(1,n):
    temp = 10**10
    for j in range(1, min(k+1, i+1) ):
        temp = min(temp, abs(h[i] - h[i-j]) + dp[i-j])
    dp[i] = temp

print(dp[n-1])

Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
n,k=list(int(i) for i in input().split())
A=list(int(i) for i in input().split())


dpmincost=[0 for i in range(n)]
dpmincost[0]=0
for i in range(1,n):
    x=sys.maxsize
    for j in range(1,k+1):
        if i-j>=0:
            x=min(dpmincost[i-j]+abs(A[i]-A[i-j]),x)
    dpmincost[i]=x
print(dpmincost)


Failing test case input:
8 1
40 29 59 219 208 10 13 13 39 84

Expected output:
413


Actual output:
[0, 11, 41, 201, 212, 410, 413, 413]


Fixed submission (verdict: Accepted):
import sys
n,k=list(int(i) for i in input().split())
A=list(int(i) for i in input().split())


dpmincost=[0 for i in range(n)]
dpmincost[0]=0
for i in range(1,n):
    x=sys.maxsize
    for j in range(1,k+1):
        if i-j>=0:
            x=min(dpmincost[i-j]+abs(A[i]-A[i-j]),x)
    dpmincost[i]=x
print(dpmincost[-1])

Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
infinity=10**8
N,K = map(int,input().split())
h = list(map(int,input().split()))

dp=[infinity]*N
dp[0]=0

for i in range(1,N):
    step=min(K,i)
    for k in range(1,step+1):
        if dp[i]>dp[i-k]+abs(h[i]-h[i-k]):
            dp[i] = dp[i-k]+abs(h[i]-h[i-k])
        

print(dp[-1])
print(dp)

Failing test case input:
5 1
65 19 34 219 208 10 13 13 39 118

Expected output:
257


Actual output:
257
[0, 46, 61, 246, 257]


Fixed submission (verdict: Accepted):
infinity=10**30
N,K = map(int,input().split())
h = list(map(int,input().split()))

dp=[infinity]*N
dp[0]=0

for i in range(1,N):
    step=min(K,i)
    for k in range(1,step+1):
        
        
        dp[i] = min(dp[i],dp[i-k]+abs(h[i]-h[i-k]))

print(dp[-1])
Problem: p03161
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
INF = 10 ** 60


def li():
    return [int(x) for x in input().split()]


N, K = li()
H = li() + [INF] * K

dp = [INF] * (N + K)

dp[0] = 0

for i in range(N):
    for k in range(K):
        dp[i + k] = min(dp[i + k], dp[i] + abs(H[i + k] - H[i]))

print(dp)
print(dp[N - 1])

Failing test case input:
4 4
40 10 15 81 22 10 20 70 237 126

Expected output:
41


Actual output:
[0, 30, 25, 41, 32, 30, 102, 1000000000000000000000000000000000000000000000000000000000000]
41


Fixed submission (verdict: Accepted):
INF = 10 ** 60


def li():
    return [int(x) for x in input().split()]


N, K = li()
H = li() + [INF] * K

dp = [INF] * (N + K)

dp[0] = 0

for i in range(N):
    for k in range(1, K+1):
        dp[i + k] = min(dp[i + k], dp[i] + abs(H[i + k] - H[i]))

print(dp[N - 1])

Problem: p03161
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
H = [0] + list(map(int, input().split()))

DP = [0] * (N+1)

for i in range(2, N+1):
  k = max(i-K, 0)
  DP[i] = min(dp + abs(h - H[i]) for dp, h in zip(DP[k:i], H[k:i]))
print(DP[N])


Failing test case input:
6 4
25 10 17 70 80 12 9 91 121 60

Expected output:
13


Actual output:
12


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
H = [0] + list(map(int, input().split()))

DP = [0] * (N+1)

for i in range(2, N+1):
  k = max(i-K, 1)
  DP[i] = min(dp + abs(h - H[i]) for dp, h in zip(DP[k:i], H[k:i]))
print(DP[N])

Problem: p03161
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k = map( int, input().split() )
h = list( map( int, input().split() ) )

for _ in range(k): h.append(0)
dp = [0]*(n+k)
for i in range(1,n):
    min_cost = 10000
    for j in range(1,k+1):
        if dp[i-j] + abs(h[i]-h[i-j]) < min_cost:
            min_cost = dp[i-j] + abs(h[i]-h[i-j])
    dp[i] = min_cost

print(dp[n-1])

Failing test case input:
3 4
40 10 17 70 80 10 20 70 80 60

Expected output:
23


Actual output:
17


Fixed submission (verdict: Accepted):
n,k = map( int, input().split() )
h = list( map( int, input().split() ) )

dp = [0]*n
for i in range(1,n):
    min_cost = 10**9+7
    for j in range(1,min(k+1,i+1)):
        min_cost = min( dp[i-j]+abs(h[i]-h[i-j]), min_cost )
    dp[i] = min_cost

print(dp[n-1])

Problem: p03161
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):

import sys
input = sys.stdin.buffer.readline

def solution():
    n,k=map(int,input().split())
    l=list(map(int,input().split()))
    dp=[0]*n
    dp[1]=abs(l[1]-l[0])
    for i in range(2,n):
        m=2e12
        for j in range(1,min(i,k)+1):
            m=min(m,dp[i-k]+abs(l[i]-l[i-j]))
        dp[i]=m
    print(dp[n-1])

solution()

Failing test case input:
5 2
46 10 34 219 155 12 20 15 80 60

Expected output:
133


Actual output:
76


Fixed submission (verdict: Accepted):

import sys
input = sys.stdin.buffer.readline

def solution():
    n,k=map(int,input().split())
    l=list(map(int,input().split()))
    dp=[0]*n
    for i in range(1,n):
        m=2e12
        for j in range(1,k+1):
            m=min(m,dp[max(0,i-j)]+abs(l[i]-l[max(0,i-j)]))
        dp[i]=m
    print(dp[n-1])

solution()
Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
if a - (b*2) > 0:
  print(a - (b*2))
print(0)

Failing test case input:
3 -290

Expected output:
583


Actual output:
583
0


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if a - (b*2) > 0:
  print(a - (b*2))
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

def main():
    A, B = map(int, input().split())

    if(A<=B*B):
        print('0')

    else:
        print(A-B*B)

main()

Failing test case input:
72 20

Expected output:
32


Actual output:
0


Fixed submission (verdict: Accepted):
import sys

def main():
    A, B = map(int, input().split())

    if(A<=2*B):
        print('0')

    else:
        print(A-2*B)

main()

Problem: p02885
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a-2*b)


Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max(0,a-2*b))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(lambda x:int(x),input().split())
x=max(a*2-b,0)
print(x)

Failing test case input:
1 -839

Expected output:
1679


Actual output:
841


Fixed submission (verdict: Accepted):
a,b=map(lambda x:int(x),input().split())
x=max(a-b*2,0)
print(x)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int, input().split())
B *= 2
if A >= B:
  print(0)
else:
  print(A-B)

Failing test case input:
2 -777

Expected output:
1556


Actual output:
0


Fixed submission (verdict: Accepted):
A,B = map(int, input().split())
B *= 2
if A <= B:
  print(0)
else:
  print(A-B)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a>b:
    a,b=b,a
c=max(0,a-2*b)
print(c)   

Failing test case input:
181 21

Expected output:
139


Actual output:
0


Fixed submission (verdict: Accepted):

a,b=map(int,input().split())
c=max(0,a-2*b)
print(c)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w,c = map(int,input().split())

res = w-c+c
if res < 0:
  res =0
print(res)

Failing test case input:
181 6

Expected output:
169


Actual output:
181


Fixed submission (verdict: Accepted):
w,c = map(int,input().split())
         
res = w - (2*c)

if res < 0:
    res =0
print(res)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

r = A - (2*B)

if A < B :
  r = 0
  
print(r)
  

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


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

r = A - (2*B)

if A < (2*B) :
  r = 0
  
print(r)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
print(max(b-2*a, 0))

Failing test case input:
1 -18

Expected output:
37


Actual output:
0


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
print(max(a-2*b, 0))
Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
 
if a<b:
    print(a-b)
elif a > b:
    print(0)


Failing test case input:
18 -46

Expected output:
110


Actual output:
0


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

if b*2 >= a:
    print(0)
else:
    print(a - b*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b= map(int, input().split())
if a<=2*b:
	print('0')
else:
	print('a-2*b')

Failing test case input:
2 -18

Expected output:
38


Actual output:
a-2*b


Fixed submission (verdict: Accepted):
a, b= map(int, input().split())
if a<=2*b:
	print('0')
else:
	print(a-2*b)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b= map(int, input().split())
print(a-b*2 if a-b*2<a else 0)

Failing test case input:
2 -777

Expected output:
1556


Actual output:
0


Fixed submission (verdict: Accepted):
a,b= map(int, input().split())
print(a-b*2 if 0<=a-b*2 else 0)

Problem: p02885
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int,input().split())
print(min(a-b*2,0))

Failing test case input:
2 -839

Expected output:
1680


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
print(max(a-b*2,0))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

if A-B*2 > B*2:
    print(A-B*2)
else:
    print(0)

Failing test case input:
39 11

Expected output:
17


Actual output:
0


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

if A <= B*2:
    print(0)
else:
    print(A-B*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=(int(x) for x in input().split())

ans=a-b-b

print(ans)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a,b=(int(x) for x in input().split())

ans=a-b-b
if ans<0:
	ans=0
print(ans)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())

if a > 2 *b:
    print(0)
else:
    print(a-2*b)

Failing test case input:
23 -46

Expected output:
115


Actual output:
0


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

if a < 2 *b:
    print(0)
else:
    print(a-2*b)
Problem: p02885
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,b = LI()
    print(max(0,b-2*a))
    return


if __name__ == "__main__":
    solve()


Failing test case input:
2 -51

Expected output:
104


Actual output:
0


Fixed submission (verdict: Accepted):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,b = LI()
    print(max(0,a-2*b))
    return


if __name__ == "__main__":
    solve()

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if b <= a or b*2>=a:
    print(0)
else:
    print(a-b*2)

Failing test case input:
1 -839

Expected output:
1679


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if a <= b or b*2>=a:
    print(0)
else:
    print(a-(b*2))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
print(max(0,(a-2)))

Failing test case input:
39 11

Expected output:
17


Actual output:
37


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(max(0,(a-2*b)))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
print(max(0, int(b) - 2*int(a)))


Failing test case input:
98 21

Expected output:
56


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = input().split()
print(max(0, int(a) - 2*int(b)))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if a - a*b >= 0:
  print(a-2*b)
else:
  print("0")

Failing test case input:
126 21

Expected output:
84


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if a - 2*b >= 0:
  print(a-2*b)
else:
  print("0")
Problem: p02885
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A, B = map(int, input().split())
print(A - B*2)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
res = max(0, A-B*2)
print(res)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
if a <= b*2:
    print(0)
else:
    print(b*2 - a)

Failing test case input:
1 -25

Expected output:
51


Actual output:
-51


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if a <= b*2:
    print(0)
else:
    print(a- b*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a<b*2:
  print(b*2-a)
else:
  print(0)

Failing test case input:
2 -147

Expected output:
296


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a>b*2:
  print(a-b*2)
else:
  print(0)

Problem: p02885
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b=map(int,input().split())
print(max(0,b-2*a))

Failing test case input:
98 21

Expected output:
56


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max(0,a-2*b))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

if A-B*2 >= B*2:
    print(A-B*2)
else:
    print(0)

Failing test case input:
45 20

Expected output:
5


Actual output:
0


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

if A <= B*2:
    print(0)
else:
    print(A-B*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if a > b / 2:
    print(a - b * 2)
else:
    print(0)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if a > b * 2:
    print(a - b * 2)
else:
    print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = input().split()
a = int(a)
b = int(b)
print(a - (b * 2))


Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a,b = input().split()
a = int(a)
b = int(b)
ret = a - (b * 2)
if ret < 0:
    ret = 0
print(ret)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input(3 ).split())

if b*2 > a:
    print(0)
else:
    print(b*2 - a)

Failing test case input:
17 5

Expected output:
7


Actual output:
3-7


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

if b*2 >= a:
    print(0)
else:
    print(a - b*2)

Problem: p02885
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
print(a-2*b)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(a-2*b) if 2*b <= a else print(0)
Problem: p02885
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

def main():
    a, b = map(int, input().split())
    if a < b * 2:
        print(a - b * 2)
    else:
        print(0)


if __name__ == "__main__":
    main()


Failing test case input:
194 13

Expected output:
168


Actual output:
0


Fixed submission (verdict: Accepted):

def main():
    a, b = map(int, input().split())
    if a < b * 2:
        print(0)
    else:
        print(a - b * 2)


if __name__ == "__main__":
    main()

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

print(min(0, A-B*2))

Failing test case input:
54 5

Expected output:
44


Actual output:
0


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

print(max(0, A-B*2))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map (int, input().split())
print(A-2*B)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
A, B = map (int, input().split())
print(max(A-2*B, 0))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
c = b * 2 - a
print(c if 0 <= c else 0)


Failing test case input:
181 6

Expected output:
169


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
c = a - b * 2
print(c if 0 <= c else 0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(min([0,a-2*b]))

Failing test case input:
3 -487

Expected output:
977


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max([0,a-2*b]))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a - (b * 2))

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(a - (b * 2), 0))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(map(int,input().split()))
a=int(s[1])
b=0
if a*a>=s[0]:
  print(0)
else:
  print(s[0]-a*a)

Failing test case input:
22 -2

Expected output:
26


Actual output:
18


Fixed submission (verdict: Accepted):
s=list(map(int,input().split()))
if 2*s[1]>=s[0]:
  print(0)
else:
  print(s[0]-2*s[1])

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a>=b*2:
    print(0)
else:
    print(a-b*2)

Failing test case input:
37 5

Expected output:
27


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a<=b*2:
    print(0)
else:
    print(a-b*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
if (a/2 - b) <= 0:
    print(0)
else:
    print(a - b*b)

Failing test case input:
35 -5

Expected output:
45


Actual output:
10


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if (a/2 - b) <= 0:
    print(0)
else:
    print(a - b*2)
Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())

if 2*b-a<0:
  print(0)
else:
  print(2*b-a)

Failing test case input:
46 -1

Expected output:
48


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a-2*b<0:
    print(0)
else:
    print(a-2*b)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a - b * 2)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(a - (b * 2), 0))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(lambda x:int(x),input().split())
x=max(b-a*2,0)
print(x)

Failing test case input:
2 -18

Expected output:
38


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(lambda x:int(x),input().split())
x=max(a-b*2,0)
print(x)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if b * 2 - a >= 0:
  print(b * 2 - a)
else:
  print(0)

Failing test case input:
72 21

Expected output:
30


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if a - b * 2 >= 0:
  print(a - b * 2)
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int, input().split()))
ans = A[0]-A[1]*2
print(ans)


Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
A = list(map(int, input().split()))
ans = A[0]-A[1]*2
if ans < 0:
    print("0")
else:
    print(ans)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
c = b*2 - a
if c > 0:
    print(0)
else:
    print(c)

Failing test case input:
1 -17

Expected output:
35


Actual output:
-35


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
c = a - b*2
if c < 0:
    print(0)
else:
    print(c)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())

if a<b:
    print(a-b)
elif a > b:
    print(0)
else:
    print(0)

Failing test case input:
7 -43

Expected output:
93


Actual output:
0


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

if b*2 >= a:
    print(0)
else:
    print(a - b*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int, input().split())
print(0 if B<A*2 else B-A*2)

Failing test case input:
126 21

Expected output:
84


Actual output:
0


Fixed submission (verdict: Accepted):
A,B=map(int, input().split())
print(0 if A<B*2 else A-B*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())

print(min(0,a-(b*2)))

Failing test case input:
37 5

Expected output:
27


Actual output:
0


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
 
print(max(0,a-(b*2)))
Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
print(min(0, int(a) - int(b) * 2))

Failing test case input:
3 -166

Expected output:
335


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = input().split()
print(max(0, int(a) - int(b) * 2))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int,(input().split()))
result = A - (B * 2)
print(result)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
A, B = map(int,(input().split()))
result = A - (B * 2)
if result < 0:
  result = 0
print(result)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B= map(int, input().split())


B_2 = B*2

if A - B_2 == 0:
    print(0)
else:
    print(A - B_2)


Failing test case input:
20 15

Expected output:
0

Actual output:
-10


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


B_2 = B*2

if A - B_2 >= 0:
    print(A - B_2)
else:
    print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())

if b*2 >= a:
    print(0)
else:
    print(b*2 - a)

Failing test case input:
2 -147

Expected output:
296


Actual output:
-296


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

if b*2 >= a:
    print(0)
else:
    print(a - b*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())

if (a-b*2)>0:
  print(int(b*2-a))
else:
  print(0)


Failing test case input:
77 -1

Expected output:
79


Actual output:
-79


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

if (a-b*2)>0:
  print(int(a-b*2))
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num_a = 12
num_b = 4
dif = num_a - num_b*2
if dif >= 0:
  print(dif)
else:
  print(0)
  

Failing test case input:
35 -5

Expected output:
45


Actual output:
4


Fixed submission (verdict: Accepted):
a, b = input().split()
num_a = int(a)
num_b = int(b)
dif = num_a - num_b*2
if dif >= 0:
  print(dif)
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

A, B = map(int, input().split())
A-B*2 if A-B*2 < 0 else 0
print(A-B*2)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):

A, B = map(int, input().split())
print(A-B*2 if A-B*2 > 0 else 0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ns = input().split(" ")
a = int(ns[0])
b = int(ns[1])
if a - 2 * b >> 0:
  print(a - 2 * b)
else:
  print(0)


Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
ns = input().split(" ")
a = int(ns[0])
b = int(ns[1])
if (a - 2 * b) > 0:
  print(a - 2 * b)
else:
  print(0)
Problem: p02885
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b=map(int,input().split())

if (a/2 >= b):
    print(0)
else:
    print(2*(a/2 - b))


Failing test case input:
22 -2

Expected output:
26


Actual output:
0


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

if (a/2 <= b):
    print(0)
else:
    print(int(2*(a/2 - b)))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())

if a > 2 *b:
    print(0)
else:
    print(2*b-a)

Failing test case input:
126 21

Expected output:
84


Actual output:
0


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

if a < 2 *b:
    print(0)
else:
    print(a-2*b)

Problem: p02885
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(int,input().split())

print(a-2*b)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


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

print(max(a-2*b,0))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a, b = map(int, input().split())
ans = a - b * 2
if ans < 0:
    ams = 0
print(ans)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):

a, b = map(int, input().split())
ans = a - b * 2
if ans < 0:
    ans = 0
print(ans)

Problem: p02885
Buggy submission (PyPy2 (5.6.0), verdict: Wrong Answer):
from sys import stdin
input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())

a, b = mi()
print(a-b*2)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
from sys import stdin
input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())

a, b = mi()
print(max(0, a-(b*2)))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B =map(int,input().split())

if(A>B*2):
  aaa=A*B
  print(aaa)
else:
  print(0)
  

Failing test case input:
22 -2

Expected output:
26


Actual output:
-44


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

if(A>B*2):
  aaa=A-B*2
  print(aaa)
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a > b*2:
    print(0)
else:
    print(a-b*2)

Failing test case input:
54 5

Expected output:
44


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a < b*2:
    print(0)
else:
    print(a-b*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split(" "))
if a > 2*b :
    print(a-2*b)
print(0)

Failing test case input:
72 20

Expected output:
32


Actual output:
32
0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split(" "))
if a > 2*b :
    print(a-2*b)
else:
    print(0)
Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a>9 or b>9:
    print(-1)
else:
    print(a*b)

Failing test case input:
4 -73

Expected output:
150


Actual output:
-292


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a<b*2:
    print(0)
else:
    print(a-b*2)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

if a <= 2 * b:
	print('O')
else:
	c = a - 2 * b
	print(c)

Failing test case input:
20 15

Expected output:
0

Actual output:
O


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

if a <= 2 * b:
	print(0)
else:
	c = a - 2 * b
	print(c)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B= map(int,input().split(" "))
result = A - 2*B
print(result)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
A,B= map(int,input().split(" "))
result = A - 2*B

if A - 2*B < 0:
    result = 0;

print(result)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

ans = A - B*2

print(ans)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


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

ans = A - B*2

if ans <= 0:
    ans = 0
print(ans)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(min(0, a - 2 * b))

Failing test case input:
2 -18

Expected output:
38


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(0, a - 2 * b))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a>b*2:
  print(b*2-a)
else:
  print(0)

Failing test case input:
2 -370

Expected output:
742


Actual output:
-742


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a>b*2:
  print(a-b*2)
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
print(12-b*2 if b*2 <= 12 else '0')

Failing test case input:
1 -51

Expected output:
103


Actual output:
114


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(a-b*2 if b*2 <= a else '0')

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())

print(a-b*2)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


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

print(max(0,a-b*2))

Problem: p02885
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
A,B=map(int,input().split())
print(min(0, A-2*B))

Failing test case input:
194 9

Expected output:
176


Actual output:
0


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
print(max(0, A-2*B))
Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int,input().split())

if a >= b:
  print(a - b * 2)
else:
  print(0)

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
 
if a >= 2*b:
  print(a - b * 2)
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(max(0,2*a-b))

Failing test case input:
1 -839

Expected output:
1679


Actual output:
841


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max(0,a-2*b))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

if 2 * B < A:
  answer = 2 * B - A
  print(answer)
else:
  print(0)

Failing test case input:
2 -839

Expected output:
1680


Actual output:
-1680


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

if 2 * B < A:
  answer = A - 2 * B
  print(answer)
else:
  print(0)

Problem: p02885
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
b, a=map(int, input().split())
if b>=(2*a):
  print(0)
else:
  print(b-(2*a))

Failing test case input:
83 -1

Expected output:
85


Actual output:
0


Fixed submission (verdict: Accepted):
b, a=map(int, input().split())
if b<=(2*a):
    print(0)
else:
    print(b-(2*a))

Problem: p02885
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
input_list = list(map(int, input().split()))
a = input_list[0]
b = input_list[1]
if a >= b*2:
    print(a-b*2)
else:
    print(9)

Failing test case input:
20 15

Expected output:
0

Actual output:
9


Fixed submission (verdict: Accepted):
input_list = list(map(int, input().split()))
a = input_list[0]
b = input_list[1]
if a >= b*2:
    print(a-b*2)
else:
    print(0)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=input().split()
a=int(a)
b=int(b)
c=b-2*a
if c<=0:
    print(0)
else:
    print(c)

Failing test case input:
106 0

Expected output:
106


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=input().split()
a=int(a)
b=int(b)
c=a-2*b
if c<=0:
    print(0)
else:
    print(c)

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a-(2*b))

Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max(0,a-(2*b)))

Problem: p02885
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b = map(int, input().split())
max(a-b*2, 0)


Failing test case input:
2 -839

Expected output:
1680


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(a-b*2, 0))

Problem: p02885
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())

print(min(a-2*b,0))

Failing test case input:
35 7

Expected output:
21


Actual output:
0


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

print(max(a-2*b,0))