TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A,B=input().split()
a=int(A)
b=int(B)
c=a*b
if a>c:
  x=a-c
else:
  x=0
print(x)

A,B=input().split()
a=int(A)
b=int(B)
c=b*2
if a>c:
  x=a-c
else:
  x=0
print(x)

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b = map(int, input().split())
print(max(2*b-a,0))

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
import sys

A, B = sys.stdin.readline().strip().split()
print(max(A-2B, 0))

import sys

A, B = [int(n) for n in sys.stdin.readline().strip().split()]
print(max(A-2*B, 0))

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b = input().strip().split()
if b * 2 >= a:
  print(0)
else:
  print(a - (b * 2))

a,b = input().strip().split()
a = int(a)
b = int(b)
if b * 2 >= a:
  print(0)
else:
  print(a - (b * 2))

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A, B = map(int, input().split())

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

A, B = map(int, input().split())

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, intput().split())
print(max(0, a - 2 * b))

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


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = [int(x) for x in input().split()]

b = b * 2

print(max(0, b - a))

a, b = [int(x) for x in input().split()]

b = b * 2

print(max(0, a - b))

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=list(map(int,input().split()))
if a<=b*2:
  print 0
else:
  print a-b*2

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = input().split(" ")
a = int(a)
b = int(b)
if a-2b < 0:
  print(0)
else:
  print(a-2b)

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


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):

n = int(input())
a = list(map(int,input().split()))



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

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


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A, B = [int(i) for i in input().split())]
ret = A - B*2
print(ret if ret > 0 else 0)


A, B = [int(i) for i in input().split()]
ret = A - B*2
print(ret if ret > 0 else 0)


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
if a-2b>0:
  print(a-2b)
else:
  print("0")

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

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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A, B = map (int, input().split())
if A-2*B>=0:
 	print()
else:
  	print(0)

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b = map(int, input().split())
print(max(0, 2*b-a))

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
print(a-2b if a-2b>0 else 0)

a,b=map(int,input().split())
print(a-b if a-b>0 else 0)

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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
N = int(input())
D = list(map(int, input().split()))
#print(D)
sum = 0
for i in range(N):
  for j in range(i+1,N):
    sum += D[i]*D[j]

print(sum)



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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, input().split())

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A,B=map(int,input()split())
if A>=B*2:
  print(A-B*2)
else:
  print(0)

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b = map(int,input())

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


a,b = map(int,input())

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

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

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
int A = input(stdin)
int B = input(stdin)
 
if(A > 2 * B):
  print(A - 2 * B)
else:
  print("0")

int A = input(stdin)
int B = input(stdin)

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

A = int(input(stdin))
B = int(input(stdin))
 
if(A > 2 * B):
  print(A - 2 * B)
else:
  print("0")

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
n= int(input())
s = input()
ans = 1
for i in range(n-1):
    if s[i]==s[i+1]:
        continue
    else:
        ans += 1

print(ans)

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

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


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
import bisect

N = int(input())
L = sorted(list(map(int, input().split())))

cnt = 0

for i in range(N - 2):
    for j in range(i + 1, N - 1):
        idx = bisect.bisect_left(L, L[i] + L[j], lo=j + 1)
        cnt += max(0, idx - (j + 1))
        
print(cnt)

A, B = map(int, input().split())


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


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
wsize,csize=[int(x) for x in input().split()]
widthconsumed=csize*2
result=wsize-widthconsumed
if result>csize:
    print(result)
else:
    print(0)


wsize,csize=[int(x) for x in input().split()]
widthconsumed=csize*2
result=wsize-widthconsumed
if result>=0:
    print(result)
else:
    print(0)

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, input().split())
s = a-2b if a-2b >= 0 else 0
print(s)

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

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

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


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
#n,k=map(int,input().split())
#H=list(map(int,input().split()))
print(max(a-2*b),0)

#n=int(input())
a,b=map(int,input().split())
#n,k=map(int,input().split())
#H=list(map(int,input().split()))
c=a-2*b
print(max(c,0))


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
print(max(0,a-2*b)

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


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
n = int(input())
taste_list = list(map(int, input().split()))
taste_sum = 0
for i in range(n):
  for j in range(n):
    taste = taste_list[i]*taste_list[j]
    taste_sum += taste
for i in range(len(taste_list)):
  taste_sum -= taste_list[i]**2
print(taste_sum/2)

a, b = input()
num_a = int(a)
num_b = int(b)
dif = num_a >= num_b*2
if dif >= 0:
  print(dif)
else:
  print(0)


a, b = input()
num_a = int(a)
num_b = int(b)
dif = num_a - num_b*2
if dif >= 0:
  print(dif)
else:
  print(0)

num_a = int(A)
num_b = int(B)
dif = num_a - num_b*2
if dif >= 0:
  print(dif)
else:
  print(0)

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

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)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
if __name__ == "__main__":
    a = input()
    b = input()
    number_a = int(a)
    number_b = int(b)
    c = number_a - 2 * number_b
    if c <= 0:
        print(0)
    else:
        print(c)

if __name__ == "__main__":
    a = input()
    b = input()
    c = a - 2 * b
    if c <= 0:
        print(0)
    else:
        print(c)

a = input()
    b = input()
    number_a = int(a)
    number_b = int(b)
    c = number_a - 2 * number_b
    if c <= 0:
        print(0)
    else:
        print(c)

    a = input()
    b = input()
    number_a = int(a)
    number_b = int(b)
    c = number_a - 2 * number_b
    if c <= 0:
        print(0)
    else:
        print(c)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int,input().split())
print(min(a-b*2,0))

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, input().split())

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

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

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a = int(input())
b=int(input())
ans =max(a-b*2,0)
print(ans)

a = int(input())
b=int(input())
if a <b:
  print(a)
else:
  print(a-b)

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
from multiprocessing import Pool


 
N = int(input())
L = list(map(int, input().split()))
 
from itertools import combinations
 
cb = combinations(L, 3)
 
def my_def(x):
    if x[1] + x[2] > x[0]:
        if x[0] + x[2] > x[1]:
            if x[0] + x[1] > x[2]:
                return(1)
    return(0)
 
print(sum(list(map(my_def, cb))))

N = 7
L = [218, 786, 704, 233, 645, 728, 389]

from itertools import combinations

cb = list(combinations(L, 3))

my_lambda = lambda x : x[0] + x[1] > x[2] and x[1] + x[2] > x[0] and x[0] + x[2] > x[1]

print(sum(
        list(
            map(my_lambda, cb)
        )
    )
)



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

# N = 7
# L = [218, 786, 704, 233, 645, 728, 389]

L.sort()

from itertools import combinations

cb = combinations(L, 2)
cb = list(map(sorted, cb))

rslt = 0

for el_cb in cb:
    for v in L:
        if el_cb[1] - el_cb[0] <= v and el_cb[0] >= v:
            rslt = rslt + 1



print(rslt)



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

# N = 7
# L = [218, 786, 704, 233, 645, 728, 389]

from itertools import combinations

cb = list(combinations(L, 3))

my_lambda = lambda x : x[0] + x[1] > x[2] and x[1] + x[2] > x[0] and x[0] + x[2] > x[1]

print(sum(
        list(
            map(my_lambda, cb)
        )
    )
)

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

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
input_line = input()
inputs = input_line.split(' ')
inputs = [int(input) for input in inputs]

A = inputs[0]
B = inputs[1]

dual_B = 2 * B

res = 0
if A > dual_b:
    res = A - dual_B
else: 
    res = 0

print(0)

input_line = input()
inputs = input_line.split(' ')
inputs = [int(input) for input in inputs]

A = inputs[0]
B = inputs[1]

dual_B = 2 * B

res = 0
if A > dual_B:
    res = A - dual_B
else:
    res = 0

print(res)


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
#coding:utf-8
a, b = map(int, input().split)
print(min(0, a - 2*b))

#coding:utf-8
a, b = map(int, input().split)
print(max(0, a - 2*b))

#coding:utf-8
a, b = map(int, input().split())
print(max(0, a - 2*b))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
print(max(int(input())-int(input())*2,0))

x,y=map(int,input().split())
print(max(x-2*y,0))

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
if a-2b>0:
  print(a-2b)
else:
  print(0)

a,b=map(int,input().split())
if a-2＊b>0:
  print(a-2＊b)
else:
  print(0)


a,b=map(int,input().split())
if a-2＊b>0:
  print(a-2b)
else:
  print(0)


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A = input('A=: ')
B = input('B=: ')
if not((1<=int(A)<=100) and (1<=int(B)<=100)):
    print("1<=A,B<=100")
    A = input('A=: ')
    B = input('B=: ')

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

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

A = input('A=: ')
B = input('B=: ')
if not((1<=A<=100) && (1<=B<=100)):
    print("1<=A,B<=100")
    A = input('A=: ')
    B = input('B=: ')

A-2B

A-2*B

A = input('A=: ')
B = input('B=: ')

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
import bisect
n=int(input())
L=[]*n
L=list(map(int,input().split()))
L.sort()
cnt=0
for i in range(n-2):
    for j in range(i+1,n-1):
        ab=L[i]+L[j]
        num=bisect.bisect_left(L[j+1:],ab)
        cnt+=num
print(cnt)

A,B = map(int,input().split(" "))
print(max(A-B*2,0))

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=int(input(),input())

if a <= b or a <= 2*b:
  print(0)

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

num1,num2=input().split()

a=int(num1)
b=int(num2)

if a <= b or a <= 2*b:
  print(0)

elif a>b:
  c=a-2*b
  print(c)

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
n,l=(int,input().split())
if(n>2*l):
    print(n-2*l)
else:
    print(0)

n,p=map(int,input().split())
if(n>2*p):
    print(n-2*p)
else:
    print(0)

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A = input()
B = input()

A = int(A)
B = int(B)

if A > B:
  print(B)
else:
  print(0)

AB = input()
A,B=AB.split()
A = int(A)
B = int(B)

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A,B=map(int, input().split())
if A < 2*B:
  print(0)
else:
  print(A-2B)

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A, B =map(int, input().split())
print(min(0,A-B*2))

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = list(map(int, inout().split()));
ans = 0;
if a <= (b*2):
  ans = 0;
else:
  ans = a - (b*2);
  
print(ans);
  

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, input().split())
print(a-n*2)

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
if a-2b>0:
  print(a-2b)
else:
  print(0)

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

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
lis = [ int(i) for i in input().split]
a = lis[0]
b = lis[1]
if b*2 > a:
  print(0)
else:
  print(a - b*2)

lis = [ int(i) for i in input().split()]
a = lis[0]
b = lis[1]
if b*2 > a:
  print(0)
else:
  print(a - b*2)

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, input().split())
print(max(20-(a + b), 0)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
if a-b＊2<=0:
  
  print(0)
else:
  print(a-b＊2)
  


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


a,b=int(input().split())
if a-b＊2<0:
  
  print(0)
else:
  print(a-b＊2)
  


a,b=int(input().split())
if a-b＊2<=0:
  
  print(0)
else:
  print(a-b＊2)
  


a,b=map(int.input(),split())
if a-b＊2>=0:
  print(a-b＊2)
else:
  print(0)
  


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


a,b=int.input(),split()
if a-b＊2>=0:
  print(a-b＊2)
else:
   print('0')
  


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


a,b=map(int.input(),split())
if a-b＊2>=0:
  print(a-b＊2)
else:
   print('0')
  


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


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


a,b=int(input().split())
if a-b＊2<0:
  
  print(0)
else:
  print(a-b＊2)
  


a,b=int(input().split())
if a-b＊2<=0:
  
  print(0)
else:
  print(a-b＊2)
  


a,b=int.input(),split()
if a-b＊2>=0:
  print(a-b＊2)
else:
   print(0)
  


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


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


a,b=int,input().split()
if a-b＊2<=0:
  
  print(0)
else:
  print(a-b＊2)
  


a,b=int(input().split())
if a-(b＊2)<=0:
  
  print(0)
else:
  print(a-(b＊2))
  


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b=map(int,input().split())
print(max(0,2*b-a))

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a,b = map(int, input().split())
if 2b >= a:
  print(0)
else:
  print(a - 2*b)

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a = int(input())
b = int(input())
if 2*b>=a:
    print("0")
else:
    print(a-2*b)

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A,B = map(int,input().split())

r = A - (2*B)

if A < B :
  r = 0
  

A,B = map(int,input().split())

r = A - (2*B)

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a=input().rstrip().split()
print(a)


# N=int(input())
A,B=[int(x) for x in input().rstrip().split()]

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

# N=int(input())
A,B=[int(x) for x in input().rstrip().split()]

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
def func():
  A,B= map(int,input().split())
  if A >= B*2:
  	print(A-2B)
  else:
  	print(0)
  
if __name__=="__main__":
  print("Input two Integers with space")
  func()


A,B= map(int,input().split())

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

def func():
    A,B=map(int,input().split())
    
    if A>=B*2:
        C=A-2*B
        print(C)
    else:
        print(0)
        
if __name__=="__main__":
    func()
    

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
n = int(input())
str = input()
char_list = list(str)


count =0
ans =0

#dellist = lambda items, indexes: [item for index, item in enumerate(items) if index not in indexes]
for i in range(len(char_list)-1):
    if char_list[i] == char_list[i+1]:
        #del_num.append(i+1)
        count += 1

ans = n - count

print(ans)


n = int(input())
str = input()
char_list = list(str)
del_num = []

dellist = lambda items, indexes: [item for index, item in enumerate(items) if index not in indexes]
ans =0
for i in range(len(char_list)-1):
    if char_list[i] == char_list[i+1]:
        del_num.append(i+1)

print(len(dellist(char_list,del_num)))


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

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
input_lst = readline().split(' ')
cand = int(input_lst[1]) - 2 * int(input_lst[0])
print(max(0, cand))

input_lst = input().split(' ')
cand = int(input_lst[0]) -  2 * int(input_lst[1])
print(max(0, cand))

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A = int(input())
B = int(input())
if A-2*B > 0:
    print(A-2*B)
else:
    print('0')

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, input().split())
print(min(0, a - 2 * b))

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

Verdicts: Wrong Answer

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b = map(int, input().split())

horizontal_length = b * 2

uncovered_part = a - horizontal_length

if uncovered_part > 0:
  return
else:
  uncovered_part = 0
  
print uncovered_part
  

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

horizontal_length = b * 2

uncovered_part = a - horizontal_length

if uncovered_part < 0:
  uncovered_part = 0
  
print str(uncovered_part)
  

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

horizontal_length = b * 2

uncovered_part = a - horizontal_length

if uncovered_part > 0:
  return
else:
  uncovered_part = 0
  
print str(uncovered_part)
  

import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    r = max(0, a - b * 2)
    print(r)

if __name__ ==  '__main__':
    main()

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):

from scipy.sparse.csgraph import floyd_warshall as fw
N, M, L = map(int, input().split())


S = [[float("INF") for i in range(N)] for i in range(N)]


for i in range(M):
    a, b, c = map(int,input().split())
    S[a-1][b-1] = c
    S[b-1][a-1] = c



Sf = fw(S)

T = [[float("INF")for i in range(N)] for i in range(N)]



for i in range(N):
    for j in range(N):
        if Sf[i][j] <= L:
            T[i][j] = 1




Tf = fw(T)

for i in range(int(input())):
    a, b = map(int, input().split())
    if Tf[a-1][b-1] != float("INF"):
        print(int(Tf[a-1][b-1])-1)
    else:
        print(-1)


A, B = map(int, input().split())

ans = A-B*2
if ans<0:
    ans = 0

print(ans)


Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A, B = map(int, input().split)

s = A - 2B

if s <= 0:
    print(0)
else:
    print(s)

A, B = map(int, input().split())

s = A - 2 * B 

if s <= 0:
    print(0)
else:
    print(s)

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
A, B = input().split()
print(max(0, A-B*2))

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

Verdicts: Runtime Error

Accepted
Problem: The window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window. Find the total horizontal length of the uncovered parts of the window then.

Submission attempts (in order):
a, b= map(int, input().split())

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

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

c=a-b*2

if c<=0:
    print(0)
else:
    print(c)


Verdicts: Runtime Error

Accepted