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 = map(int, input().split())
c = b * 2 - a
ans = 0 if c < 0 else min(c, 0)
print(ans)

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 = map(int, input().split())

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

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

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


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

print(int(b*2-a))

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


Verdicts: Wrong Answer

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())
num = (b*2)-a
if num < 0:
  num = 0
print(num)

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

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(0)
else:
  print((a-b*2)*0.5)

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

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

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

Verdicts: 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):
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

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

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

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

    else:
        print(A-B*B)

main()

import sys

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

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

    else:
        print(A-B*B)

main()

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

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):
N = int(input())
S = input()
cnt = 1
for i in range(1,N):
  if S[i-1] != S[i]:
    cnt += 1

print(cnt)

N = int(input())
S = input()
cnt = 0
for i in range(1,N):
  if S[i-1] != S[i]:
    cnt += 1

print(cnt+1)

A,B = map(int,input().split())
ans = A - B*2 if A -B*2 >0 else 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):
A,B=map(int,input().split())
if (A<2*B):
    print(0)
    break
print(A-2*B)

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

A,B=map(int,input().split())
if (A<2*B):
    print(0)
else:
    print(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):
import bisect
N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range(N):
  for j in range(i+1,N):
      add_len = L[i]+L[j]
      idx = bisect.bisect_left(L, add_len)
      ans += max(0, idx-(j+1))
print(ans)
      

A,B = map(int,input().split())
curtain_len = A-B*2
if curtain_len > 0:
  print(curtain_len)
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 = int(input())
B = int(input())
C = A - 2 * B
if C < 0:
  return 0
else :
  return C

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


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


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-2b>=0:
  print(a-2b)
else a-2b<0:
  print(0)

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


a,b=map(int,input(),split())
if a-2*b>=0:
  print(a-2*b)
else a-2*b<0:
  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(0)
else:
  print(A-2*b)
  

A,B = map(int,input().split())
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):
a,b map(int,input().split(" ")
print(a -2＊b)

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

         

a,b= map(int,input().split(" "))
c=a -2*b
if c>0:
  print(c)
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):
a, b = map(int,input().split())

c = a - 2b

print(c if c > 0 else 0)

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

c = a - 2b

print(c if c > 0 else 0)

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

c = a - 2b

if c > 0:
  print(c)
  
else:
  print(0)

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

c = a - 2 * b

print(c if c > 0 else 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())
print(2*a-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())

m=a-2b

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

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

m=a-2b

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

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

m=a-2b



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

m=a-2*b

if m>=0:
  print(m)
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())

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

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


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 = list(map(int,input().split()))
print(str(max(0,B - A * 2)))

def print_ans(input_line):
    """Test Case
    >>> print_ans("12 4")
    4
    """
    A, B = list(map(int,input_line.split()))
    print(str(max(0,A - B * 2)))

if __name__ == '__main__':
    input_line = input()
    print_ans(input_line)

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-2*B < 0:
  print('0')
else:
  print(A-2*B)

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

A,B = list(map(int,input().split()))
if A-2*B < 0:
  print('0')
else:
  print(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):
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())
c= a - b*2
if c > 0:
  print(c)
else:
  print 0

a,b= map(int,input().split())
c= a - b*2
if c > 0:
    print(c)
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 b * 2 - a >= 0:
  print(b * 2 - a)
else:
  print(0)

a, b = map(int, input().split())
if a - b * 2 >= 0:
  print(a - b * 2)
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,print().split())
print(max(a-b*2,0))


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):
n=int(input())
S=input()
s=list(S)
 

def jokyolist(s):
  jokyo=[]
  
  for i in range(len(s)-1):
    if s[i]==s[i+1]:
      jokyo.append(i)
    jokyo=sorted(jokyo,reverse=True)
  return jokyo
 
def remov(s,jokyo):
  for i in range(len(jokyo)):
    s.pop(jokyo[i])
    return s
def removtimes(jokyo):
  t=len(jokyo)
  return t
 
i=0
while i<=n:
  jokyo=jokyolist(s)
  if removtimes(jokyo)==0:
    break
  s=remov(s,jokyo)
  i+=1

print(len(s))


A,B=input().split()

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

A,B=input().split()
a=int(A)
b=int(B)
if a>=b*2:
  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):
n=int(input())
s=input()
t=s[0]
ans=1
for i in range(1,n):
    if t!=s[i]:
        ans+=1
        t=s[i]
print(ans)

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())
print(max(a-2b,0))

a,b=map(int,input().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):
n  = int(input())

if n % 2 == 0:
  print((n // 2) / n)
else:
  print((int(n / 2) + 1)  / n)

n,m  = map(int, input().split())

if 2 * m <= n:
  print(n - 2 * m)
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 = input().split()
a=int(a)
b=int(b)
temp=a-2b
if temp<=0:
  temp=0
print(temp)

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

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:
    print(0)
else:
    print(b*2 - a)

a,b = map(int,input().split())
if a <= b*2:
    print(0)
else:
    print(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 = map(int,input().split())

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

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

if a<=2*b:
  print(0)
else:
  print(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-2*B if (A-2*B) < 0 else 0)


A,B = map(int, input().split())
print(A-2*B if (A-2*B) > 0 else 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=int(input().split())
print(max(a-b*2,0))

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):
import numpy as np
N = int(input())
L = np.array([int(l) for l in input().split(' ')])
counts =0

for i in range(N):
    for j in range(i+1,N):
        B2  = L[j+1:][(L[j+1:]<L[i]+L[j]) & (L[j+1:]>abs(L[i]-L[j]))]
        counts +=len(B2)
print(counts)

import numpy as np
N = int(input())
L = np.array([int(l) for l in input().split(' ')])
counts =0

for i in range(N):
    for j in range(i+1,N):
        B2  = L[j+1:][(L[j+1:]<L[i]+L[j]) & (L[j+1:]>abs(L[i]-L[j]))]
        counts +=len(B2)
print(counts)
                

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())
print(str(2*b-a))

a,b=map(int,input().split())
if a>=2*b: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())
print(max(0,b-a*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 = map(int, input().split())
if A < B*2:
  print(0)
else:
  print(A-B*2)

A, B = 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 = 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

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(float, input().split()))

for i in a:
	sum += i 
	double = i ** 2
print((sum**2-double)/2)

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

for i in a:
	sum += a[i] 
	double = a[i] ** 2
print((sum**2-double)/2)

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

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

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

for i in a:
	sum += i 
	double = i ** 2
print((sum**2-double)/2)

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

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

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

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):
N=int(input())
L=list(map(int,input().split()))
c=0
L.sort()
for i in range(0,N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            if L[k]>=L[i]+L[j]:
                c+=N-k
                break
N=int((N-2)*(N-1)*N/6-c)
print(N)

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=input().split()
a=int(a)
b=int(b)
c=b-2*a
if c<=0:
    print(0)
else:
    print(c)

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

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):
# -*- coding: utf-8 -*-
from collections import defaultdict
from heapq import heappop, heappush


class Graph(object):
    

    def __init__(self):
        self.graph = defaultdict(list)

    def __len__(self):
        return len(self.graph)

    def add_edge(self, src, dst, weight=1):
        self.graph[src].append((dst, weight))

    def get_nodes(self):
        return self.graph.keys()


class Dijkstra(object):
    

    def __init__(self, graph, start):
        self.g = graph.graph

        
        
        self.dist = defaultdict(lambda: float('inf'))
        self.dist[start] = 0

        
        self.prev = defaultdict(lambda: None)

        
        self.Q = []
        heappush(self.Q, (self.dist[start], start))

        while self.Q:
            
            dist_u, u = heappop(self.Q)
            if self.dist[u] < dist_u:
                continue
            for v, weight in self.g[u]:
                alt = dist_u + weight
                if self.dist[v] > alt:
                    self.dist[v] = alt
                    self.prev[v] = u
                    heappush(self.Q, (alt, v))

    def shortest_distance(self, goal):
        
        return self.dist[goal]

    def shortest_path(self, goal):
        
        path = []
        node = goal
        while node is not None:
            path.append(node)
            node = self.prev[node]
        return path[::-1]


def query(src, dst, d_list, d_dict, l):
    count = 0
    now_l = l
    d = d_list[src-1]
    distance = d.shortest_distance(dst-1)
    if distance <= l:
        print(0)
        return

    path = d.shortest_path(dst-1)

    if(len(path) == 1):
        print(-1)
        return

    now_s = path[0]

    for item in path[1:]:
        length = d_dict[str(now_s)+":"+str(item)]
        if length > l:
            print(-1)
            return
        elif length > now_l:
            count += 1
            now_l = l - length
        else:
            now_l = now_l - length
        now_s = item
    print(count)


n, m, l = map(int, input().split())
inputs = []
d_dict = dict()

for i in range(m):
    a, b, c = map(int, input().split())
    inputs.append((a-1, b-1, c))
    d_dict[str(a-1)+":"+str(b-1)] = c
    d_dict[str(b-1)+":"+str(a-1)] = c

g = Graph()
for src, dst, weight in inputs:
    g.add_edge(src, dst, weight)
    g.add_edge(dst, src, weight)

d_list = []

for i in range(n):
    d_list.append(Dijkstra(g, i))

q = int(input())

for i in range(q):
    s, t = map(int, input().split())
    query(s, t, d_list, d_dict, l)


# -*- coding: utf-8 -*-

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())
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 = map(int,input().split())
cartain = B*2

if A<=cartain :
    input(0)
else :
    input(A-cartain)




A, B = map(int,input().split())
cartain = B*2

if A<=cartain :
    print(0)
else :
    print(A-cartain)




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 math
N = int(input())
L = list(map(int,input().split()))
B = []
s = 0
for i in range(N-2):
    for k in range(i+1,N-1):
        for _ in range(k+1,N):
            if L[i]-L[k]<L[_] and L[k]-L[i]<L[_] and L[_]<L[i]+L[k]:
                s = (L[i]+L[k]+L[_])/2
                B.append(math.sqrt(s*(s-L[i])*(s-L[k])*(s-L[_])))
k = set(B)
k = list(k)
print(len(k))


import bisect
N = int(input())
L = list(map(int,input().split()))
L.sort()
sum = 0
for i in range(0,N):
  L_1st= L[i]
  for j in range(i+1,N):
    L_2nd = L[j]
    c_min = b-a+1
    c_max = b+a-1
    l = bisect.bisect_left(Ls,c_min,lo = j+1)
    if l!= N:
      r = bisect.bisect_right(Ls,c_max,lo = j+1)
      if r:
        r = r-1
        if r>= l:
          sum += r-l+1
print(sum)


A,B = map(int,input().split())
if (A-2*B)<0:
  print(0)
else:
  print(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):
N = int(input())
d = list(map(int,input().split()))
sum = 0
for i in range(N-1):
    for j in range(i+1,N):
        sum += d[i] + d[j]
print(sum)


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):
n=int(input())
l=list(map(int, input().split()))
l=sorted([x for x in set(l) if l.count(x)<4])
ans=0
x=[]
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,(n-sum((x>l[j]+l[i]) for x in l))):
            if (l[i]<(l[j]+l[k])and l[j]<(l[i]+l[k]) and x.count([l[i],l[j],l[k]])==0):
                x.append([l[i],l[j],l[k]])
                ans+=1

print(ans)


n=int(input())
l=list(map(int, input().split()))
l=sorted([x for x in set(l) if l.count(x)<4])
ans=0
x=[]
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,(n-sum((x>l[j]+l[i]) for x in l))):
            if (l[i]<(l[j]+l[k])and l[j]<(l[i]+l[k]) and x.count([l[i],l[j],l[k]])==0):
                x.append([l[i],l[j],l[k]])
                ans+=1

print(ans)

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

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

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(lambda x:int(x),input().split())
x=max(b-a*2,0)
print(x)

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

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

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=input().sp;it()
print(int(A)-int(B)*2)


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

A,B=Imput()
print(int(A)-int(B)*2)


A,B=input()
print(int(A)-int(B)*2)


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

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):
n = int(input())
ln = input().split()
s = 0

for i in range(n):
  for j in range(i + 1, n):
    s += int(ln[i]) * int(ln[j])
    
print(s)

a, b = input().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 = int(input().split())
if 2*B >= A:
  print(0)
else:
  print(A-(2*B))

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

A, B = list(map(int, input().split())) 
if 2*B >= A:
  print(0)
else:
  print(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):
A,B=map(int,input().spllit())
if A - B * 2 < 0:
  print(0)
else:
  print(A - B * 2)

A,B = map(int,input().split())
ANS = A - B * 2
if ANS <= 0:
  print(0)
else:
  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):
if A-2*B <= 0:
  print(0)

else:
  print(A-2*B)
  

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

0<=A<=100
0<=B<=100

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

else:
  print(0)


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

else:
  print(str(int(A)-int(B)*2))
  


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

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

0<=int(A)<=100
0<=int(B)<=100

if int(A)>int(B)*2:
  print(int(A)-int(B)*2)

else:
  print(0)
  

A = input()
B = input()

0<=int(A)<=100
0<=int(B)<=100

if int(A)>int(B)*2:
  print(int(A)-int(B)*2)

else:
  print(0)


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

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):
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):
n = int(input())
d = list(map(int, input().split()))
count = 0
for i in range(len(d)):
    for j in range(i+1, len(d)):
        count += d[i] * d[j]
print(count)

x, y = map(int, input().split())
output =  0 if x <= 2 * y else x - 2 * y
print(output)

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(A-B*2)else:print(0)


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

if(A-B*2>0):
    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):
n =int(input())
nl = list(map(int,input().split()))
result = 0
for i in range(n):
    for k in range(i+1,n):
        result += nl[i] * nl[k]
        
print(result)

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

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):
from bisect import bisect_left
 
N = int(input())
Lmat = [int(n) for n in input().split()]
Lmat.sort()
 
sum = 0

for i in range(N):
    for j in range(i + 1, N):
        sum += bisect_left(Lmat, Lmat[i]+Lmat[j]) - (j + 1)
print(sum)

A, B= [int(item) for item in input().split()]

temp_res = A - B * 2

if temp_res < 0:
    res = 0
else:
    res = temp_res

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):
A,B = map(int,input().split())
print(min(A-B-B,0))

A,B = map(int,input().split())
print(max(A-B-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):
x, y = map(int(input().split()))
if x - 2*y >= 0:
  print(x-2*y)
else:
  print(0)


x, y = int(input().split())
if x - 2*y >= 0:
  print(x-2*y)
else:
  print(0)

x, y = map(int, input().split())
if x - 2*y >= 0:
  print(x-2*y)
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):
a, b = map(int, input().split())

print(max(o, 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 = 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):
print(max(0,eval(input().replace('','-2*'))))

a,b=map(int,input().split());print(max(a-b-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 = map(int, input().split())

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

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

Verdicts: Runtime Error

Accepted