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):
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import copy










'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''





n = int(stdin.readline().rstrip())
d = stdin.readline().rstrip().split()
res = 0
count1 = 0
for el1 in d:
    count2 = 0
    for el2 in d:
        if (count2 > count1):
            res += int(el1) * int(el2)
        count2 += 1
    count1 += 1

print(res)


from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import copy










'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''





tes = stdin.readline().rstrip().split()
a = int(tes[0])
b = int(tes[1])
res = a - b * 2
if (res <= 0):
    print(0)
else:
    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())

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

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

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


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())


C = (B*2)
D = A-C

if D = 0:
    print(0)
else:
    print(D) 

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


C = (A-(B*2))

if C = 0:
    print(0)
else:
    print(C) 

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


B_2 = B*2

if A - B_2 >= 0:
    print(A - B_2)
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(0, a-2b))

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

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

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

count = 0

for i in range(N):
    for j in range(i+1,N):
        count += list_d[i]*list_d[j]

print(count)

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())
b = b**2

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

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

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


while True:
    a,b = input().split()
    a = int(a)
    b = int(b)
    if 1<=a<=100 and 1<=b<=100:
        break
c = a-2*b
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):
N=int(input())
List=list(map(int,input().split()))
c=0
for i in range(N-1):
  for j in range(i+1:N):
    c=c+(List[i]*List[j])
print(c)

N=int(input())
List=list(map(int,input().split()))
c=0
for i in range(N-1):
  for j in range(i+1,N):
    c=c+(List[i]*List[j])
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

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

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

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

#################################
def warshall_floyd(n,d):
    
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d
##############################
from scipy.sparse.csgraph import csgraph_from_dense,dijkstra,floyd_warshall
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
ans = int(0)
N,M,L =LI()
s = []
t = []
dp = [[inf] * (N) for _ in range(N)]
for i in range(M):
    a, b, c = map(int, input().split())
    dp[a-1][b-1] = c
    dp[b-1][a-1] = c
Q = I()
for i in range(Q):
    a,b = LI()
    s.append(a-1)
    t.append(b-1)

for i in range(N):
    dp[i][i] = 0

#print(warshall_floyd(N,dp))
#d1 = [[0] * (N) for _ in range(N)]
#d1 = warshall_floyd(N,dp)
G = csgraph_from_dense(dp, null_value=10**9)
d1 = floyd_warshall(G)

newdp = [[inf] * (N) for _ in range(N)]
for i in range(N):
    for j in range(i+1,N):
        if d1[i][j]<=L:
            newdp[i][j] = 1
            newdp[j][i] = 1

for i in range(N):
    newdp[i][i] = 0
#print(newdp)
#print(warshall_floyd(N,newdp))
#d2 = [[0] * (N) for _ in range(N)]
#d2 = warshall_floyd(N,newdp)
G = csgraph_from_dense(newdp, null_value=10**9)
d2 = floyd_warshall(G)

for i in range(Q):
    ans = d2[s[i]][t[i]]-1
    if ans!= inf:
        print(int(ans))
    else:
        print("-1")

import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
A,B = LI()
ans = int(0)

ans = max(A-2*B,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()))
ans = 0
L.sort()
for i in range(N-2):
  for j in range(i+1,N-1):
    for k in range(j+1,N):
      if L[i]+L[j] > L[k] and L[k]+L[j] > L[i] and L[i]+L[k] > L[j]:
        ans = ans + 1
      else:
        break
print(ans)


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


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

n = int(input())
li =list(input().split())
a=0
for i in range(n-1):
  if li[i] == li[i+1]:
    a += 1
print(n-a)


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

a,b = map(int,inpout())
ans = a-2*b
if ans <= 0:
  print(0)
else:
  print(ans)

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

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

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

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

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

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

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

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

a,b = map(int,input().split())
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):
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):
def lowerBound(nums, target):
    if nums[-1] < target: return -1
    lp = 0
    rp = len(nums) - 1
    mp = lp + rp >> 1
    while lp <= rp:
        mp = lp + rp >> 1
        if nums[mp] == target:
            return mp
        if nums[mp] < target:
            lp = mp + 1
        else:
            rp = mp - 1
    return mp if target < nums[mp] else -1

if __name__ == '__main__':
    N = int(input())
    L = [int(l) for l in input().split()]
    L.sort()
    ret = 0
    for idx in range(len(L) - 1, 1, -1):
        for jdx in range(idx - 1, 0, -1):
            c = L[idx] - L[jdx] + 1
            ldx = lowerBound(L[:jdx], c)
            if ldx == -1: continue
            ret += jdx - ldx
    print(ret)


if __name__ == '__main__':
    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):
num =input()
lst = num.split()
curtain = lst(1) * 2
ans = lst(0) - curtain

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


num =input()
lst = num.split()
curtain = int(lst[1]) * 2
ans = int(lst[0]) - curtain

if(ans <= 0):
 print("0")
else:
 print("{}".format(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())
if A > 2B :
  print(A - 2B)
else :
  print(0)

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

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

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

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

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

rest = a - b*2
if rest >-1:
    print(rest)
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 > 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().split())
if b <= a or b*2>=a:
    print(0)
else:
    print(a-b*2)

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

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


a = int(input())
b = int(input())

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


list = input().split()

a = int(list[0])
b = int(list[1])

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

value = A - B * 2
if value >= 0:
  return value
else:
  return 0

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

a, b = map(int, input())
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):
C=A-2*B
if C>0:
    uncovered = C
else:
    uncovered = 0
print('the lenth of unvocered =',uncovered)

A,B=map(int,input().split())
C=A-2*B
if C>0:
    uncovered = C
else:
    uncovered = 0
print('the lenth of unvocered =',uncovered)

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

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

if(c=a-b*2 >=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):
def LI():
  return [int(s) for s in input().split()]
 
A,B = LI()
 
print(int(A-2*B)) if A < 2*B else 0

 LI():
  return [int(s) for s in input().split()]
 
A,B = LI()
 
print(int(A-2*B)) if A > 2*B else print(0)

def LI():
  return [int(s) for s in input().split()]
 
A,B = LI()
 
print(int(A-2*B)) if A < 2*B else print(0)

def LI():
  return [int(s) for s in input().split()]
 
A,B = LI()
 
print(int(A-2*B)) if A > 2*B else print(0)

Verdicts: Wrong Answer

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):
# coding: utf-8
# Your code here!

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

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

# coding: utf-8
# Your code here!

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(i) for i in input().split())

try:
  print(a - (b*2))
else:
  print("0")

a,b =(int(i) for i in input().split())
result = a - (b*2)
if result > 0:
  print(result)
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>=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: 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())
#B = int(input())

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

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

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

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

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

l = []
for j in range(N-1):
    for i in range(j+1,N):
        for k in range(i+1,N):
            if(L[i]+L[j]>L[k])and(L[i]+L[k]>L[j])and(L[i]<L[j]+L[k]):
                l.append([i,j,k])
                if [i,j,k] in l:
                    continue
                else:
                    count += 1
print(count)

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

l = []
for j in range(N-1):
    for i in range(j+1,N):
        for k in range(i+1,N):
            if(L[i]+L[j]>L[k])and(L[i]+L[k]>L[j])and(L[i]<L[j]+L[k]):
                l.append([i,j,k])
                if([i,j,k] in l):
                    count += 1
print(count)
print(l)


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 numpy as np
n = int(input())
#ds = np.array([int(x) for x in input().split()])
ds = [int(x) for x in input().split()]
ds2 = [x*x for x in ds]
s = sum(ds)
#print((sum(ds * sum(ds)) - sum(ds ** 2)) / 2 )
print(int((sum(ds * s) - sum(ds2)) / 2 ))

n = int(input())
ds = [int(x) for x in input().split()]
ds2 = [x*x for x in ds]
s = 0
s2 = 0
for i in range(n):
  s += ds[i]
  s2 += ds2[i]
ss = 0
for i in range(n):
  ss += ds[i] * s

print((ss - s2) / 2 )

a,b = [int(x) for x in 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):
s = int(input())
s[0] = A
s[1] = B
result = A - B * 2
if result < 0:
    result = 0
print(result)

s = list(map(int, input().split()))
A = s[0] 
B = s[1]
result = A - B * 2
if result < 0:
    result = 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):
a, b = map(int, input().split)

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

else:
  print(a - cover_b)


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

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

else:
  print(a - cover_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>=2B:
  print(A-2B)
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):
input(); d_list = list(map(int, input().split()))
sum=0
for i, x in enumerate(d_list):
  for y in d_list[i+1:]:
    sum+=x*y
print("%d" % sum)

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

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

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


N = int(input())
ns = input().split()

sum_ = 0

for i in range(N):
    for j in range(N):
        sum_ += int(ns[i])*int(ns[j])
        
print(sum_)

N = int(input())
ns = input().split()

dic = {}

for i in range(N):
    if(ns[i] in dic.keys() and dic[ns[i]]<=2):
        dic[ns[i]] += 1
    elif(ns[i] not in dic.keys()):
        dic[ns[i]] = 1

a,b,c = 0,0,0
for key in dic.keys():
    if(dic[key] == 1):
        a += 1
    elif(dic[key] == 2):
        b += 1
    elif(dic[key] == 3):
        c += 1

unique = a+b+c
sum_ = 0

sum_ += c
sum_ += (b+c)*(unique-1)

key_list = list(dic.keys())
n = len(key_list)
for p in range(n-2):
    for q in range(n-1):
        if(p<q):
            for r in range(n):
                if(q<r):
                    x,y,z = int(key_list[p]),int(key_list[q]),int(key_list[r])
                    if(x+y>z):
                        sum_ += unique-(r+1-1)
                            break

print(int(sum_))

a,b=input().split()

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

import math
a,b = input().split()
a,b = int(a),int(b)
print(max(a-2*b,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())
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

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()
c=b+b
if(a-b!=0):
    print(int(a-b))
else:
    print(0)



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

c=b+b
if(a-c!=0)and(a-c>=0):
    print(a-c)
else:
    print(0)

#print(type(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):
x,y = map(int,input().split())	
print(max(0,x-2y))

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

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 = list(input())

slime = 1

for i in range(0,N-1):
  if S[i] != S[i+1]:
    slime += 1
  else:
    slime += 0
    
print(slime)



A,B = list(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):
input(A),split(B)
print(A-2*B)

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):
N = int(input())
S = input()

p = ''
result = 0
for i in range(N):
    if p != S[i]:
        result += 1
        p = S[i]
print(result)

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


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

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 fileinput

def process(A, B):
	if A <= B*2:
      return 0
    else:
      return A - B*2

for line in fileinput.input():
    print(process(map(int, line.split()))


import fileinput

def process(A, B):
	if A =< B*2:
      return 0
    else:
      return A - B*2

for line in fileinput.input():
    print(process(map(int, line.split()))

import fileinput

def process(A, B):
    print(A, B)
    if A <= B*2:
        return 0
    else:
        return A - B*2

for line in fileinput.input():
    print(line.split())
    print(process(*map(int, line.split())))


import fileinput

def process(A, B):
    if A <= B*2:
        return 0
    else:
        return A - B*2

for line in fileinput.input():
    print(process(*map(int, line.split())))


Verdicts: Runtime Error

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

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

Verdicts: Runtime Error

Accepted