Problem:


Score : 100 points

Problem Statement

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.

Constraints

1 \leq A \leq 100

1 \leq B \leq 100

A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the total horizontal length of the uncovered parts of the window.

Sample Input 1

12 4

Sample Output 1

4

We have a window with a horizontal length of 12, and two curtains, each of length 4, that cover both ends of the window, for example. The uncovered part has a horizontal length of 4.

Sample Input 2

20 15

Sample Output 2

0

If the window is completely covered, print 0.

Sample Input 3

20 30

Sample Output 3

0

Each curtain may be longer than the window.



Sample input:
12 4


Sample output:
4

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<cstdlib>
#include<map>
#include<queue>
#include<stack>
#include<deque>
#include<fstream>
#include<string>
#include<sstream>
#include<iomanip>
#include<numeric>
#include<cctype>
#include<random>
using namespace std;

//fixed << setprecision(10)
#define Yes(a) a ? "Yes" : "No";
#define YES(a) a ? "YES" : "NO";
#define rep(i,n) for(int i=0;i<n;i++)

int gcd(int a,int b) {
	if (a < b) {
		int tmp = a;
		a = b;
		b = tmp;
	}
	int r = a % b;
	while (r != 0) {
		a = b;
		b = r;
		r = a % b;
	}
	return b;
}

map<int, int> prime;
void Prime(long long int n) {
	for (int i = 2; i <= n; i++) {
		int count = 0;
		while (n % i == 0) {
			count++;
			n /= i;
		}
		if (count != 0) {
			prime.insert(make_pair(i, count));
		}
	}
}

int main() {
	int a, b;
	cin >> a >> b;
	if (a <= 2 * b)
		cout << 0 << endl;
	else
		cout << a - 2 * b << endl;
}

Submission status: Runtime Error

Solution code:
s=input();print(max(0,int(s[:3])-2*int(s[3:])))

Submission status: Runtime Error

Solution code:
s=input();print(max(0,int(s[:2])-2*int(s[2:])))

Submission status: Runtime Error

Solution code:
N = int(input())
l = map(int,input().split())
l = sorted(l)
l_dict = dict()
max_l  = max(l)
min_l = min(l)
t_list = [one for one in l if one+min_l < max_l]
for i,one in enumerate(t_list):
    l_dict[one] = i
    
    
big_dict = dict()
for one in t_list:
    big_dict[one] = bisect.bisect_left(l,2*one)

counter = 0

for a,b in combinations(t_list,2):
    tmp = a + b
    counter += bisect.bisect_left(l[l_dict[b]+1:big_dict[b]],tmp)
    
print(counter)

Submission status: Runtime Error

Solution code:
N=int(input())
L=list(map(int, input().split()))
L.sort()
L.reverse()
a=L.pop(0)
count=0
while(L!=[]):
    for i in range(len(L)):
        for j in range(i+1,len(L)):
            if a < L[i]+L[j]:
                count+=1
    a=L.pop(0)
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
N = N-1
S = input()
s = ' '
o = ' '
n = 0
for i in range(N):
  if S[n] == S[n+1]:
    if s[-1] != S[n]:
      s = s + S[n]
    n = n + 1
  else:
    if s == o:
      s = s + S[n]
      s = s.lstrip()
    s = s + S[n+1]
    n = n + 1
print(len(s.lstrip()))

Submission status: Runtime Error

Solution code:
print(A)
print(B)

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
n, *l = map(int, open(0).read().split())
sl = sorted(l,reverse=True)
ans = 0
for i in range (n):
  for j in range (i+1,n):
    for k in range(j+1,n):
      if sl[i]-sl[j] < sl[j] and sl[i]<sl[j]+sl[k]:
        ans = ans + 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
	N = int(input())
	L = list(map(int, input().split()))
	L.sort()
	sum = 0
	for c in range(2, N):
		for b in range(c - 1, 0, -1):
			for a in range(b - 1, -1, -1):
				if L[a] + L[b] > L[c]:
					# print(a, b, c)
					sum += 1
				else:
					break
	print(sum)

Submission status: Runtime Error

Solution code:
import bisect

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

L.sort()

buff = []
ll = []


for i in range(N):
    l_b = []
    for j in range(i+1, N):
        l_b.append(L[i]+L[j])
        ll.append(L[i]+L[j])
    if i != N-1:
        buff.append(l_b)
# buff.sort()
# print(L)
# print(buff)

ans = 0
_len = len(buff)

for i in range(_len):
    for j in range(len(buff[i])):
        index = bisect.bisect_left(L[i+j+1+1:], buff[i][j])
        # print(L[i+j+1+1:])
        # print(index, buff[i][j])
        ans += index
print(ans)


# for i in range(N):
#     index = bisect.bisect_left(buff, L[i])
#     print(index)
#     ans += index
# print(ans)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if a<=2b:
  print(0)
else:
  print(a-2b)

Submission status: Runtime Error

Solution code:
# -*- 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):
    """
    ダイクストラ法（二分ヒープ）による最短経路探索
    計算量: O((E+V)logV)
    """

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

        # startノードからの最短距離
        # startノードは0, それ以外は無限大で初期化
        self.dist = defaultdict(lambda: float('inf'))
        self.dist[start] = 0

        # 最短経路での1つ前のノード
        self.prev = defaultdict(lambda: None)

        # startノードをキューに入れる
        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):
        """
        startノードからgoalノードまでの最短距離
        """
        return self.dist[goal]

    def shortest_path(self, goal):
        """
        startノードから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)

Submission status: Runtime Error

Solution code:
import itertools
num = int(input())
cmlist = input().split(' ')
count = 0
for i,j,k in itertools.combinations(cmlist, 3):
  if int(i)<int(j)+int(k) and int(j)<int(i)+int(k) and int(k)<int(i)+int(j):
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
def main():
    number_of_bars = int(input())
    bar_list = list(map(int,input().split()))
    print(len(traiangle_maker(bar_list))//3)


def traiangle_maker(bar_list):
    bar_list.sort(reverse=True)
    result_list = []
    for i in range(len(bar_list)):
        for j in range(len(bar_list)):
            if i == j or bar_list[i] < bar_list[j]:
                continue
            minimum_length = bar_list[i] - bar_list[j]
            max_length = bar_list[i] + bar_list[j]
            for k in bar_list:
                if k > minimum_length and k < max_length and k != bar_list[i] and k != bar_list[j]:
                    traiangle = [bar_list[i],bar_list[j],k]
                    result_list.append(traiangle)

    return result_list


main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
N=int(input())
S=list(input())

t=0
for i in range(N-1):
    if S[i+1] == S[i]:
        t+=1
print(N-t)

Submission status: Runtime Error

Solution code:
A, B = map(int, innput().split())
ans = A - B - B
if ans > 0:
  print(ans)
else:
  print(0)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b= map(int, input().split())

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

Submission status: Runtime Error

Solution code:
N=int(input())
b=list(map(int,input().split()))
c=[]
for i in range(N):
	c.append(b[i]**2)
print(((sum(b))**2-sum(c))/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=a-b*2
d=b*2-a
if c<=0:
  print(0)

else :
  print(d)

Submission status: Runtime Error

Solution code:
n = int(input())
t = tuple(map(int, input().split()))
T = 0
for i in range(n-2):
  a = t[i]
  for j in range(n-i-1):
    b = t[i+j+1]
    for k in range(n-i-j-2):
      c = t[i+j+k+2]
      m = max(a,b,c)
      if m < a+b+c-m :
        T += 1
print(T)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = str(input())
Ds = str(input()).split(" ")
answer = 0
 
for di in range(len(Ds)):
  for dii in range(di):
    sum = Ds[di] + Ds[dii] 
    answer += sum
 
print (answer)

Submission status: Runtime Error

Solution code:
n = int(input())
L = sorted(list(map(int,input().split())))
cnt = 0
for i in range(n):
    for j in range(i+1,n):
        a,b = L[i],L[j]
        cnt += sum(abs(a-b)< l < a+b for l in L if l != a and l != b)
print(cnt//3)

Submission status: Runtime Error

Solution code:
import itertools
N = int(input())
L = list(map(int, input().split()))
num = []
ans = 0

for i in itertools.permutations(L, r=3):
    i = list(i)
    i.sort()
    if i not in num:
        num.append(i)

for i in range(len(num)):
    if num[i][0] + num[i][1] > num[i][2]　and num[i][1] + num[i][2] > num[i][0] and num[i][0] + num[i][2] > num[i][1]:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#PythonCode
A=int(input())
B=int(input())
C=A-B
D=B-A
if C<=0:
  print(0)

else :
  print(D)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import itertools as it 

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

l.sort()

triangles = set()
for a, b, c in it.combinations(l, 3):
    if a + b > c and b + c > a and a + c > b:
        triangles.add((a, b, c))

print(len(triangles))

Submission status: Runtime Error

Solution code:
N=int(input())
L=list(map(int,input().split()))
L.sort()
#print(L)

answer=0
for i in range(N-2):
  index_c=i+2
  for j in range(i+1,N-1):
    for k in range(index_c,N):
      if L[i]+L[j]<=L[k]:
        #print(i,j,k-1,k-j-1)
        answer+=k-j-1
        index_c=k-1
        break
    else:
      #print(i,j,N-1,N-j-1)
      answer+=N-j-1
      index_c=N-1
        
print(answer)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans=0
for i in range(N-2):
  a=L[i]
  for j in range(i+1,N-1):
    b=L[j]
    for k in range(j+1,N):
      c=L[k]
      if a<b+c and b<c+a and c<a+b:
        ans+=1
      else:
        break
        
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
d_list = list(map(int, input().split()))

sum_num = 0
for i in range(N-1):
    for j in range(i+1, N):
        sum_num += d_list[i] * d_list[j]

print(sum_num)

Submission status: Runtime Error

Solution code:
num =input()
lst = num.split()
curtain = lst(1) * 2
ans = lst(0) - curtain

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

Submission status: Runtime Error

Solution code:
ABInput = str(input())
 
AB = ABInput.split(" ")
 
A = AB[0]
B = AB[1]
 
TotalCartain = B * 2
 
if TotalCartain > A or TotalCartain == A:
  print (0)
else:
  print (A-TotalCartain)

Submission status: Runtime Error

Solution code:
a, b= map(int, intput().split())
if a<=2*b:
	print('0')
else:
	print('a-2*b')

Submission status: Runtime Error

Solution code:
ABInput = str(input())
 
AB = ABInput.split(" ")
 
A = AB[0]
B = AB[1]

TotalCartain = B * 2

if TotalCartain > A or TotalCartain = A:
  print (0)
else:
  print (A-TotalCartain)

Submission status: Runtime Error

Solution code:
n = int(input())
l = list(map(int,input().split()))
l.sort()
#s = input()
ans = 0
for i in range(n-2):
  for j in range(i+1,n-1):
    tmp = l[i] + l[j]
    for k in range(j+1,n):
      #print(i,j,k)
      if tmp > l[k]:
        ans += 1
      else:
        break

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
d_list = list(map(int, input().split()))
sum_num = 0
for i in range(N-1):
    for j in range(i+1, N):
        sum_num += d_list[i] * d_list[j]

print(sum_num)

Submission status: Runtime Error

Solution code:
ABInput = str(input())
 
AB = ABInput.split(" ")
 
A = AB[0]
B = AB[1]
 
if B * 2 >= A:
  print (0)
else:
  print (A-B*2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
ABInput = str(input())

AB = ABInput.split(" ")

A = AB[0]
B = AB[1]

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

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = A - 2 * B
if C < 0:
  return 0
else :
  return C

Submission status: Runtime Error

Solution code:

n = int(input())
tastes = list(map(lambda x:int(x), input().split()))

ans = 0

while len(tastes)>0:
    x = tastes[0]
    del tastes[0]
    for y in tastes:
        ans += x * y
            
print(ans)

Submission status: Runtime Error

Solution code:
input(A),split(B)
print(A-2*B)

Submission status: Runtime Error

Solution code:
if B * 2 >= A:
  print 0
else:
  print A-B*2

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
data = input()
if data.split(' ')[0] > data.split(' ')[1]*2:
	print(0)
else:
  print(int(data.split(' ')[0]-data.split(' ')[1]*2)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
ans = min(0,A-(2`B)
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

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

Submission status: Runtime Error

Solution code:
def solve(A: int, B: int):
    ans = max(0, A - (2 * B))
    print(ans)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split(","))
if a > b :
    print(a-b)
print(0)

Submission status: Runtime Error

Solution code:
n = int(input())
tastes = list(map(lambda x:int(x), input().split()))

ans = 0

while len(tastes)>0:
    x = tastes.pop()
    for y in tastes:
        ans += x * y
        
print(ans)

Submission status: Runtime Error

Solution code:
A, B = input().split()
print(max(0, A-B*2))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b= map(int, input().split())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import copy

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

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

'''
.append(要素)
.extend(要素)
.insert(場所,要素)
-1で末尾で末尾から一つ前
'''
'''
間に空白追加
' '.join(lis)
'''
'''
copy.copy(配列名)
'''

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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
A = sys.argv[1]
B = sys.argv[2]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = input().split(',')
if a > b:
  print(a-b)
print(0)

Submission status: Runtime Error

Solution code:
A,B = map(int, input().sprit())
C = A - B * 2
if C<0:
  print(0)  
else:
  print(C)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
i = input()
ar = i.split()
print(max(ar[0]-2*ar[1], 0))

Submission status: Runtime Error

Solution code:
a,b = map(int, inpout().split())
if a > b:
  print(a-b)
print(0)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
a,b=map(int, input())
print(max(a-b*2,0))

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())

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

Submission status: Runtime Error

Solution code:
A,B = map(int, input().strip())
print(max(0, A-(2*B)))

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
if 2*m >=n:
	print(0)
else:
	print(abs(n-(2*m))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split)

s = A - 2B

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
print(A-2B)

Submission status: Runtime Error

Solution code:
a,b = [int(j) for j in input().split()]
print(max(a-2*b, 0)

Submission status: Runtime Error

Solution code:
n=input()
a,b,c=map(int,input().split())

Submission status: Runtime Error

Solution code:
a,b=map(int,input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
 n, k = list(map( int , input().split()))
 print( max( 0 , n - 2*k))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())

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

Submission status: Runtime Error

Solution code:
#include <stdio.h>
int main(){
    int a,b;
    scanf("%d %d",&a,&b);
    int ans= a-2*b;
    if(ans <0){ans = 0;}
    printf("%d\n",ans);
    return 0;
}

Submission status: Runtime Error

Solution code:
A,B = int(input())

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

Submission status: Runtime Error

Solution code:
import sys

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())

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

Submission status: Runtime Error

Solution code:
a,s=map(int,input(),split())
print(max(a-2*s,0))

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
print(max(20-(a + b), 0)

Submission status: Runtime Error

Solution code:
#include <stdio.h>
int main(){
    int a,b;
    scanf("%d %d",&a,&b);
    int ans= a-2*b;
    if(ans <0){ans = 0;}
    printf("%d\n",ans);
    return 0;
}s

Submission status: Runtime Error

Solution code:
a,b map(int,input().split(" ")
print(a -2＊b)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())

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

Submission status: Runtime Error

Solution code:
A = list(map(int, input().split())) 
return max(0,A[0]-2*A[1])

Submission status: Runtime Error

Solution code:
A, B = map(int, input())

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

ans = a // (b * 2)

if ans <= 0:
    ans = 0

print(ans)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
print(a-n*2)

Submission status: Runtime Error

Solution code:
a,b = map(int,input(),split())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>

using namespace std;

template <typename T>
static inline void ArrayInput(vector<T>& A) {
  for (auto itr = A.begin(); itr < A.end(); ++itr) cin >> *itr;
}

template <typename T>
static inline void ArrayPut(const vector<T>& A) {
  for (auto itr = A.begin(); itr < A.end(); ++itr) cout << *itr << " ";
  cout << endl;
}

int main() {
  uint64_t A, B;
  cin >> A >> B;
  if (A > 2 * B) {
    cout << A - (2 * B);
  } else {
    cout << 0;
  }

  return 0;
}

Submission status: Runtime Error

Solution code:
import sys; readline = sys.stdin.readline
from collections import deque


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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = list(map(int,input().split()))

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