Problem:


Score : 100 points

Problem Statement

Takahashi, who is A years old, is riding a Ferris wheel.

It costs B yen (B is an even number) to ride the Ferris wheel if you are 13 years old or older, but children between 6 and 12 years old (inclusive) can ride it for half the cost, and children who are 5 years old or younger are free of charge. (Yen is the currency of Japan.)

Find the cost of the Ferris wheel for Takahashi.

Constraints

0 ≤ A ≤ 100

2 ≤ B ≤ 1000

B is an even number.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the cost of the Ferris wheel for Takahashi.

Sample Input 1

30 100

Sample Output 1

100

Takahashi is 30 years old now, and the cost of the Ferris wheel is 100 yen.

Sample Input 2

12 100

Sample Output 2

50

Takahashi is 12 years old, and the cost of the Ferris wheel is the half of 100 yen, that is, 50 yen.

Sample Input 3

0 100

Sample Output 3

0

Takahashi is 0 years old, and he can ride the Ferris wheel for free.



Sample input:
30 100


Sample output:
100

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if A >= 13:
  print(B)
else if A > 5:
  print(B/2)
else :
  print(0)

Submission status: Runtime Error

Solution code:
if age >= 13 :
    return money
else if age > 5 :
    return money / 2
else:
    return 0

Submission status: Runtime Error

Solution code:
def fun(A,B):
  if A >= 13 :
    return B
  else if A > 5 :
    return B / 2
  else:
    return 0

Submission status: Runtime Error

Solution code:
def fun(age,money):
  if age >= 13 :
    return money
  else if age > 5 :
    return money / 2
  else:
    return 0

Submission status: Runtime Error

Solution code:
a,b=map(int, sinput().split())
if a >= 13:
    print(b)
elif 6 <= a and a <= 12:
    print(b/2)
else:
    print(0)

Submission status: Runtime Error

Solution code:
A, B =list (map (int, input().split(' ') ) )
if A > = 13 :
    print(B)
elif A < = 5 :
    print(0)
else :
    print(B/2)

Submission status: Runtime Error

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

if(a >= 13){
  print(b)
}
elif(6 <= a <=12){
  print(b/2)
}
else{
  print("0")
}

Submission status: Runtime Error

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

if A>=13:
	print(B)
elif A>=6:
	print(B/2)
else:
	print(0)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
L = []
R = []
LR = [list(map(int,input().split())) for _ in range(M)]
for i in range(M):
    L.append(LR[i][0])
countL = 0
countL = max(L)
for j in range(M):
    R.append(LR[j][1])
countR = 0
countR = min(R)
if countR - countL + 1 <= 0:
    print("0")
else:
    print(countR-countL+1)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
L = []
R = []
LR = [list(map(int,input().split())) for _ in range(M)]
for i in range(M):
    L.append(LR[i][0])
countL = 0
countL = max(L)
for j in range(M):
    R.append(LR[j][1])
countR = 0
countR = min(R)
if countR >= countL:
    print(0)
else:
    print(countR-countL+1)

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
lm = list(map(int,input().split()))
ln = []
for _ in range(m):
    ln.append(list(map(int,input().split())))
for a in range(m):
    for b in range(ln[a][0]):
        if  ln[a][1] > min(lm) :
            c = min(lm)
            lm[lm.index(c)] =  ln[a][1] 
    print('aa')
print(sum(lm))

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
lm = list(map(int,input().split()))
ln = []
for _ in range(m):
    ln.append(list(map(int,input().split())))

Submission status: Runtime Error

Solution code:
import collections

def int_cards(N, cards, operations):
    col_cards = collections.deque(sorted(cards), N)
    operations.sort(reverse=True)
    for c, b in operations:
        for _ in range(b):
            if col_cards[0] >= c:
                break
            col_cards.popleft()
            col_cards.append(c)
            
    print(sum(col_cards))
    
N, M = map(int, input().split())
A = list(map(int,input().split()))
operations = []
for i in range(M):
    B, C = map(int, input().split())
    operations.append([C, B])
    
int_cards(N, A, operations)

Submission status: Runtime Error

Solution code:
    a,b=map(int,input().split())
    if a<=5:
        print(0)
    elif a>=6 and 12<=a:
        print(b/2)
    else:
        print(b)

Submission status: Runtime Error

Solution code:
a,b=map(int,input.split())
if a<=5:
    print(0)
elif a>=6 and 12<=a:
    print(b/2)
else:
    print(b)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
if A >= 13:
    print(B)
elif 6 <= A < 13:
    print(b/2)
else:
    print('0')

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
if A >= 13:
    print(B)
elif 6 <= A < 13:
    print(b/2)
else:
    print('0)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A = list(map(int, input().split()))
BC = [list(map(int, input().split())) for i in range(M)]

A = sorted(A)
BC = sorted(BC, key=lambda x: -x[1])

lenA = len(A)
i = 0
for bc in BC:
  for j in range(bc[0]):
    if A[i] > bc[1]: break
    if i > lenA: break
    A[i] = bc[1]
    i += 1

print(sum(A))

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
print(b if A >= 13 else int(b/2) if 12 >= A >= 6 else 0)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
print(b if A >= 13 else int(b/2) if A >= 6 else 0)

Submission status: Runtime Error

Solution code:
data = list(map(lambda x: int(x),input().split(" ")))

cardNum = []

for n in range(data[1]):
	cardNum.append(list(map(lambda x: int(x),input().split(" "))))


card = [0]*(data[0])

check = [0,1000000]

for n in range(data[1]):
	if check[0] < cardNum[n][0]:
		check[0] = cardNum[n][0]
	if check[1] > cardNum[n][1]:
		check[1] = cardNum[n][1]

print(check[1]-check[0]+1)

Submission status: Runtime Error

Solution code:
A,B = int(input())
if A<6:
  print(0)
elif A<13:
  print(B/2)
else:
  print(B)

Submission status: Runtime Error

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

if a >= 13:
  out = b
elif a >= 6:
  out = b/2
else:
  out = 0
print(out)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = map(int(input().split()))
if A>=13:
  print(B)
elif A>=6:
  print(B/2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
A,B = map(int(input().split()))
if A>=13:
  print(B)
elif A>=6
  print(B/2)
else
  print(0)

Submission status: Runtime Error

Solution code:
A,B = map(int(input().split()))
if A>=13:
  print(B)
elif A>=6
  print(B/2)
else
print(0)

Submission status: Runtime Error

Solution code:
a, b = [int(i) for i in input().split()]

if a >= 13:
	print(B)
elif a >= 6:
	print(B/2)
else:
	print(0)

Submission status: Runtime Error

Solution code:
i = list(map(int,input().split()))
A = i[0]
B = i[1]
if A>=13:
  print(B)
elif A<=5:
    print(0)
else:
    print(B/2)
i = list(map(int,input().split()))
A = i[0]
B = i[1]
if A>=13:
  print(B)
elif A<=5:
    print(0)
elif A>=6 and A<=12:
    print(B/2)

Submission status: Runtime Error

Solution code:
i = list(map(int,input().split()))
A = i[0]
B = i[1]
if A>12:
  print(B)
  elif A<6:
    print(0)
    else:
      print(B/2)

Submission status: Runtime Error

Solution code:
i = list(map(int,input().split()))
A = i[0]
B = i[1]
if A>12:
  pritn(B)
  elif A<6:
    print(0)
    else:
      print(B/2)

Submission status: Runtime Error

Solution code:
r,d,x0 = map(int,input().split())

xlist = []

xlist.append(r*x0-d)

for i in range(9):
    xlist.append(r*xlist[i]-d)
    map(int,xlist)
    print(xlist[i])

Submission status: Runtime Error

Solution code:
r,d,x0 = map(int,input().split())

xlist = []

xlist.append(r*x0-d)

for i in range(9):
    xlist.append(r*xlist[i]-d)
    print(int(xlist[i]))

Submission status: Runtime Error

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

if a > 12:
  print(b)
  break
elif a > 5:
  print(b/2)
  break
else:
  print(0)

Submission status: Runtime Error

Solution code:
a=input()
A=int(a[0])
B=int(a[1])
if A >=13:
  print(B)
elif A<=5:
  print(0)
else:
  print(B/2)

Submission status: Runtime Error

Solution code:

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

if a<=5:
    ans = 0
elif 6<=a and a<=12:
    ans = b/2
else:
    ans = b

print((int)ans)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
    if a >=13:
        print(b)
    elif a <= 5:
        print(0)
    else:
        print(b // 2)

Submission status: Runtime Error

Solution code:
n.m=map(int,raw_input().split())

if n<=5:
  print(0)
elif n<=12:
  print(m/2)
else:
  print(m)

Submission status: Runtime Error

Solution code:
n,m=map(int,raw_input().split())

a=[]

a=map(int,raw_input().split())

b=[map(int,raw_input().split() )for i in range(m)]
b=sorted(b,key=lambda x: -x[1])
for i in range(m):
    a.sort()
    if a[0]>b[i][1]:
        break
    for j in range(b[i][0]):
        if a[j] < b[i][1]:
                a[j] = b[i][1]
        else:
           break
print(sum(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
a = [int(s) for s in input().split()]
a.sort()
b_c = [[int(s) for s in input().split()] for i in range(m)]
cnt = 0
for k in range(m):
    while cnt < b_c[k][0]:
        if a[cnt] <= b_c[k][1]:
            a[cnt] = b_c[k][1]
        cnt += 1
    a.sort()
print(sum(a))

Submission status: Runtime Error

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

BC = []
for _ in range(M):
    BC.append(tuple(map(int, input().split())))

A.sort()

BC.sort(key=lambda x:x[1], reverse=True)

D = []
for bc in BC:
    b = bc[0]
    c = bc[1]

    for _ in range(b):
        D.append(c)

    if len(D) >= N: 
        break

for i in range(N):
    if A[i] < D[-1]:
        A[i] = D[-1]
        D.pop()
        if not D:
            break

print(sum(A))

Submission status: Runtime Error

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

BC = []
for _ in range(M):
    BC.append(tuple(map(int, input().split())))

A.sort()

BC.sort(key=lambda x:x[1])

BC = [[bc[1]] * bc[0] for bc in BC]
BC = [flat_bc for bc in BC for flat_bc in bc]
BC = BC[:N]


for i in range(N):
    if A[i] < BC[-1]:
        A[i] = BC[-1]
        BC.pop()
        if not BC:
            break

print(sum(A))

Submission status: Runtime Error

Solution code:
a,b = input(),split()
a = int(a)
b = int(b)
price = 0
if(a>=13):
  price = b
if(a>=6):
  price = b / 2
print(price)

Submission status: Runtime Error

Solution code:
n, g = map(int, input().split())
cards = [[int(x) for x in input().split()] for _ in range(g)]

cards.sort(key=lambda x: x[0])
lmx = cards[g - 1][0]
cards.sort(key=lambda x: x[1])
rmn = min(cards[0][1], n)

print(max(0, rmn - lmx + 1))

Submission status: Runtime Error

Solution code:
lis = list(map(int, input().split()))
if lis[0] => 13:
	print(lis[1])
elif lis[0]>5 and lis[0]<13:
	print(lis[1]/2)
else:
	print(0)

Submission status: Runtime Error

Solution code:
lis = list(map(int, input().split()))
if lis[0] => 13:
	return lis[1]
elif lis[0]>5 and lis[0]<13:
	return lis[1]/2
else:
	return 0

Submission status: Runtime Error

Solution code:
lis = list(map(int, input().split())
if lis[0] => 13:
           return lis[1]
	elif lis[0]>5 and lis[0]<13:
           return lis[1]/2
	else:
           return 0

Submission status: Runtime Error

Solution code:
A , B = map(int,input().split())
if A => 13:
  print(B)
elif 6 =< A => 12:
  print(B / 2)
else:
  print(0)

Submission status: Runtime Error

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


if 13 <= a :
  print(b)
elif 6 <= a <= 12:
  print( b / 2 )
else:
  print(0)

Submission status: Runtime Error

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


if 13 <= a :
  print(b)
elif 6 <= a <= 12:
  print( b / 2 )
else:
  print(0)

Submission status: Runtime Error

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


if 13 <= a :
  print(b)
elif 6 <= a <= 12:
  print( b / 2 )
else:
  print(0)

Submission status: Runtime Error

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


if 13 <= a :
  print(b)
elif 6 <= a <= 12:
  print( b / 2 )
else:
  print(0)

Submission status: Runtime Error

Solution code:
A, B = input(), input()
def C(A, B):
  if (A <= 13):
    print(B)
  elif if(A >= 6 && A <= 12):
    print(B\2)
  elif if:
    print(0)
    
C(A, B)

Submission status: Runtime Error

Solution code:
A, B = input(), input()
if (A <= 13):
  print(B)
elif if(A >= 6 && A <= 12):
  print(B\2)
else if:
  print(0)

Submission status: Runtime Error

Solution code:
A, B = input(), input()
if (A <= 13):
  print(B)
elif if(A >= 6 && A <= 12):
  print(B\2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
#D
n, m = list(map(int, input().split()))
alist = list(map(int, input().split()))
for i in range(m) :
    b, c = list(map(int, input().split()))
    alist += [c] * min(n, b)
alist.sort()
print(sum(alist))

Submission status: Runtime Error

Solution code:
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [tuple(map(int, raw_input().split())) for i in range(m)]
for b,c in y:
  while x[b-1] > c:
    b -= 1
  x[0:b] = [c]*b
  x.sort()
print(sum(x))

Submission status: Runtime Error

Solution code:
n, m = tuple(map(int, input().split()))
x = sorted(list(map(int, input().split())))
y = [tuple(map(int, input().split())) for i in range(m)]
for b,c in y:
  while x[b-1] > c:
    b -= 1
  x[0:b] = [c]*b
  x.sort()
print(sum(x))

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
x = list(map(int, input().split())).sort()
y = [tuple(map(int, input().split())) for i in range(m)]
for b,c in y:
  while x[b-1] > c:
    b -= 1
  x[0:b] = [c]*b
  x.sort()
print(sum(x))

Submission status: Runtime Error

Solution code:
[A,B]=list(map(int,input().split(" ")))
if A>=13:
    print(B)
elif A>=6:
    print(B/2)
else
    print(0)

Submission status: Runtime Error

Solution code:
argN, argA, argB, argC, argD = list(map(int,input().split()))
argS = input()

if argA < argB and argC < argD:
  flgOIKOSI = False
elif argB < argA and argD < argC:
  flgOIKOSI = False
else:
  flgOIKOSI = True
#print(flgOIKOSI)
  
if "##" in argS[argA - 1:argC]:
  #print(argS[argA - 1:argC])
  print("No")
elif "##" in argS[argB - 1:argD]:
  #print(argS[argB - 1:argD])
  print("No")
elif flgOIKOSI == False:
  print("Yes")
else:
  aryS = list(argS.split("#"))
  #print(aryS)
  #print(len(max(aryS)))
  if len(max(aryS)) > 2:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
def solve():
    from operator import itemgetter

    turns = tuple(map(int, input().split()))[1]
    cardsList = sorted(list(map(int, input().split())))

    turnsList = [tuple(map(int, input().split())) for _ in range(turns)]
    for chances, num in sorted(turnsList, key=itemgetter(1), reverse=True):
        for i in range(chances):
            if num > cardsList[i]:
                cardsList[i] = num
            elif i == 0:
                return print(sum(cardsList))
            else:
                break
        cardsList.sort()
    print(sum(cardsList))
solve()

Submission status: Runtime Error

Solution code:
N,M = [int(i) for i in input().split()]
A = list(map(int,input().split()))
A = sorted(A)
change_list = []
for i in range(M):
    a,b = input().split()
    change_list.append((int(a),int(b)))
for i in range(M):
    B = change_list[i][0]
    C = change_list[i][1]
    k = 0
    while A[k] < C and k < B:
        A[k] = C
        k += 1
    A = sorted(A)
print(sum(A))

Submission status: Runtime Error

Solution code:
a,b=map(int input().split())
if a>=13:
    print(b)
elif a<=5:
    print(0)
else:
    print(b/2)

Submission status: Runtime Error

Solution code:
a,b=map(int input().split())
if a>=13:
    print(b\n)
elif a<=5:
    print(0\n)
else:
    print(b/2\n)

Submission status: Runtime Error

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

listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;

count = 0
for i in range(1,N+1):
  for j in range(M):
    if  i < listA[j][0] or listA[j][1] < i:
      print(i)
      break;
    if j == M-1:
      count += 1


print(count)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
ListA = list(map(int,input().split()))
dictionary = {}
for i in range(M):
    B,C = map(int,input().split())
    dictionary[C] = B
    
ListA =  sorted(ListA)
dict_keys = sorted(dictionary.keys())
for dict_key in dict_keys:
    for i in range(dictionary[dict_key]):
        if dict_key > ListA[i]:
            ListA[i] = dict_key
        else:
            ListA[i] = ListA[i]
    ListA = sorted(ListA)
print(sum(ListA))

Submission status: Runtime Error

Solution code:
arr= []
sum= []
idx=0
t= 0
res= 0
pos= 0
str=[]
q=int(input())
for i in range(q):
	str.append(input())
for j in range(q):
	inp= list(map(int, str[j].split(' ')))
	if(inp[0]==2):
		print(arr[idx], sum[idx]+res)
		continue
	t+= 1
	for i in range(t-1):
		if(arr[i]<inp[1]):
			continue
		arr.insert(i, inp[1])
		sum.insert(i, 0)
		pos=0
		break
	if(len(arr)!=t):
		arr.append(inp[1])
		sum.append(0)
		pos= t-1
		
	for i in range(t):
			temp= abs(arr[i]-arr[pos])
			sum[pos]+= temp
			sum[i]+= temp

	for i in range(t-1):
		if(sum[i]<sum[idx]):
			idx= i
	res+= inp[2]

Submission status: Runtime Error

Solution code:
arr= []
sum= []
idx=0
t= 0
res= 0
pos= 0

q=int(input())
for j in range(q):
	inp= list(map(int, input().split(' ')))
	if(inp[0]==2):
		print(arr[idx], sum[idx]+res)
		continue
	t+= 1
	for i in range(t-1):
		if(arr[i]<inp[1]):
			continue
		arr.insert(i, inp[1])
		sum.insert(i, 0)
		pos=0
		break
	if(len(arr)!=t):
		arr.append(inp[1])
		sum.append(0)
		pos= t-1
		
	for i in range(t):
			temp= abs(arr[i]-arr[pos])
			sum[pos]+= temp
			sum[i]+= temp

	for i in range(t-1):
		if(sum[i]<sum[idx]):
			idx= i
	res+= inp[2]

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())
if x > 12:
  print(y)
else if 6 <= x <= 12:
  print(y/2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
a,b=map(int, input().split())
if a<=5:
    b=0
elif 6<=a<=12:
    b=b/2
  
 print(int(b))

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if A <= 5:
  price = B
elif A >=6 and A <= 12:
  price = B/2
else:
  price = B
print(price)

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if A <= 5:
  price = B
elif A >=6 and A <= 12:
  price = B/2
else:
  price = B
print(B)

Submission status: Runtime Error

Solution code:
a,b=map(int, input().split())
if a<=5:
  b=0
elif 6<=a<=12:
  b=b/2
  
 print(int(b))

Submission status: Runtime Error

Solution code:
a,b=map(int, input().split())
if a<=5:
  b=0
elif 6<=a<=12:
  b=b/2
  
 print(b)

Submission status: Runtime Error

Solution code:
a,b=int(input().split())
if a>12:
    print(b)
elif a>5:
    print(b//2)
else:
    print(0)

Submission status: Runtime Error

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

if A>=13:
            m = B
elif A>=6:
            m =B/2
else:
            m =0
            
print(m)

Submission status: Runtime Error

Solution code:
r,d,x=input().split()
m = int(x)
for i in range(1, 11):
    m = int(r) * int(m) - int(d)
    print(int(m))

Submission status: Runtime Error

Solution code:
import sys

A = sys.argv[1]
B = sys.argv[2]

if A <= 5:
  print(0)
elif A <= 12:
  print(int(B/2))
else:
  print(B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a>=13:
  print(b)
elif a>=6 and a<=12
  print(int(b/2))
else 
  print(0)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a>=13:
  print(b)
elif a>=6 and a<=12
  print(b/2)
else 
  print(0)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a>=13:
  print(b)
elif 6<=a and a<=13
  print(b/2)
else 
  print(0)

Submission status: Runtime Error

Solution code:
import numpy as np

n_ID, n_gates = [int(data) for data in input().split()]
L = np.empty(n_gates, dtype = int)
R = np.empty(n_gates, dtype = int)

for i in range(n_gates):
  L[i], R[i] = [int(data) for data in input().split()]

ID_gate_matrix = np.zeros((n_ID, n_gates))

for j in range(n_gates):
  for i in range(L[j] - 1, R[j]):
    ID_gate_matrix[i][j] = 1

Card_Counter = 0
for i in range(n_ID):
  for j in range(n_gates):
    if ID_gate_matrix[i][j] != 1:
      break
  else:
    Card_Counter += 1

print(Card_Counter)

Submission status: Runtime Error

Solution code:
a,b = input().split()
if a > 12 :
  print(b)
elif 12 >= b and b >= 6:
  print(b/2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
a,b = input ().split()
if a > 12 :
  print(b)
elif 12 >= b and b >= 6:
  print(b/2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
a,b = input ().split()
if a > 12 :
  print(b)
elif 12 >= b >= 6:
  print(b/2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
l = []
r = []

for i in range(m):
    a,b = map(int,input().split())
    l.append(a)
    r.append(b)


if min(r) < max(l):
    print(min(r) - max(l) + 1)
else:
    print(0)

Submission status: Runtime Error

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

if a>=13:
  print(b+"\n")
elif a>=6 and a<=12:
  print(b/2+"\n")
else:
  print(0+"\n")

Submission status: Runtime Error

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

if a>=13:
  print(b)
elif a>=6 and a<=12:
  print(b/2)
else:
  print(0)

Submission status: Runtime Error

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

if a>=13:
  print(b)
elif a>=6&&a<=12:
  print(b/2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
a,b=list(map(int,input().split(" ")))
if a>=13:
  pass
elif a>=6:
  b=b//2
else
  b=0
  
print(b)

Submission status: Runtime Error

Solution code:
a,b=list(map(int,input().split(" ")))
if b>=13:
  pass
elif b>=6:
  b=b//2
else
  b=0
  
print(b)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[1]:


import sys
#input = sys.stdin.readline
A, B = map(int, input().split())


# In[ ]:


if A <=5:
    print(0)
el

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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


from sys import stdin
import itertools



############################################

# read data for n sequences.
temp = stdin.readline().split()
N = int(temp[0])
M = int(temp[1])

A = stdin.readline().split()
card = []
for i in A:
    card.append(int(i))
card=sorted(card)
#print(card)

data = []
for i in range(M):
    write = stdin.readline().split()
    data.append(write)

for sousa in data:
    # sort card every time
    card=sorted(card)
    for i in range(int(sousa[0])):
        if card[i] < int(sousa[1]):
            card[i] = int(sousa[1])
        else:
            break

print(sum(card))

Submission status: Runtime Error

Solution code:
value = input().split()
age = int(value[0])
cost = int(value[1])

if(age >= 6 and age<= 12):
    result = cost // 2
elif(age <= 5):
    result = 0

print(result)

Submission status: Runtime Error

Solution code:
n,m = map(int, input().split())

lmin = 1
rmax = n
for i in range(m):
    l, r = map(int, input().split())

    if l > lmin:
        lmin = l

    if r < rmax:
        rmax = r

if rmax	< lmin:
    print(0)
else:
    print(rmax - lmin + 1)

Submission status: Runtime Error

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

if 0 <=A<=100 and 2<=B<=1000:
    if B%2 == 1:
        print("ERROR")
        exit()
    else :
        if A <=5 :
            fare=0
        elif 6<=A<=12 :
            fare=B//2
        else:
            fare=B
else:
    print("ERROR")
    exit()

print(fare)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

args=sys.argv
A=int(args[1])
B=int(args[2])


if 0 <=A<=100 and 2<=B<=1000:
    if B%2 == 1:
        print("ERROR")
        exit()
    else :
        if A <=5 :
            fare=0
        elif 6<=A<=12 :
            fare=int(B/2)
        else:
            fare=B
else:
    print("ERROR")
    exit()

print(fare)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A=<5:
  print(0)
elif 6<=A<=12:
  print(B/2)
elif A>=13:
  print(B)

Submission status: Runtime Error

Solution code:
a, b = [int(x) for x in input().rstrip().split(" ")]
if a >= 13:
  print(b)
elsif a < 6:
  print(0)
else:
  print(b // 2)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
a=int(a)
b=int(b)
if 0<=a<6:
  b=0
elif 6<=a<13:
  b=b//2
else:
  b=b
print(b)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
a=int(a)
if 0<=a<6:
  b=0
elif 6<=a<13:
  b=b/2
else:
  b=b
b=int(b)
print(b)

Submission status: Runtime Error

Solution code:
a, b =(int, input().split())
if 13 <= a:
  print(b)
elif 6 <= a <= 12:
  print(b//2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = [None] * M
for i in range(M):
    BC[i] = tuple(map(int, input().split()))
BC.sort(key=lambda tpl: tpl[1], reverse=True)  # sort by C descendant

D = [0] * N
i = 0
j = 0
while i < N and j < M:
    b, c = BC[j]
    for k in range(i, min(i + b, N)):
        D[k] = c
    i += b
    j += 1

for i in range(N):
    A[i] = max(A[i], D[i])

print(sum(A))

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
min = 0
max = 1000000
for i in range(m):
    l, r = map(int, input().split())
    if min < l:
        min = l
    if max > r:
        max = r
print(max - min + 1 if max - min + 1 > 0 else 0)

Submission status: Runtime Error

Solution code:
a = [0] * (10 ** 9)

Submission status: Runtime Error

Solution code:
A,B = map(int, input())
if A <= 5:
  print(0)
elif A <= 12:
  print(B/2)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A, B = [int(i) for i in input().split(" ")]
if B <= 5:
  print(str(0))
elif B <= 13:
  print(str(int(B/2)))
else:
  print(str(b))

Submission status: Runtime Error

Solution code:
r, D, x = map(int, input().split())
 
for i in range(10):
    x = r * x - D
    print(x)

Submission status: Runtime Error

Solution code:
r, D, x = map(int, input().split())

for i in range(10):
    x = r * x - D
    print(x)

Submission status: Runtime Error

Solution code:
import bisect
import heapq 

Q=int(input())

que=list(map(int,input().split()))
b=que[2]
l,r=[-que[1]],[que[1]]
heapq.heapify(l)
heapq.heapify(r)
a=0
tmp=que[1]
j=1
for i in range(Q-1):
    que=list(map(int,input().split()))
    if que[0]==1:
        j+=1
        b+=que[2]
        q1=que[1]
        if j%2==0:
            if q1<-l[0]:
                heapq.heappushpop(l,-q1)
            else:
                heapq.heappushpop(r,q1)

        else:
            if q1<-l[0]:
                heapq.heappush(r, -heapq.heappushpop(l,-q1))
            else:
                heapq.heappush(l, -heapq.heappushpop(r,q1))
        
        if -l[0]!=r[0]: a+=abs(tmp-q1)
        else: a+=abs(tmp-q1)-abs(-l[0]-tmp)
        tmp=-l[0]

    elif que[0]==2:
        print(tmp,a+b)

Submission status: Runtime Error

Solution code:
import bisect
import heapq 

Q=int(input())

que=list(map(int,input().split()))
b=que[2]
a=[que[1]]
l,r=[-que[1]],[que[1]]
heapq.heapify(l)
heapq.heapify(r)
min=0
j=1
tmp=que[1]
for i in range(Q-1):
    que=list(map(int,input().split()))
    if que[0]==1:
        j+=1
        q1=que[1]
        b+=que[2]
        tmp=-l[0]
        if j%2==0:
            if q1<=-l[0]:
                heapq.heappushpop(l,-q1)
            else:
                heapq.heappushpop(r,q1)

        else:
            if q1<=-l[0]:
                heapq.heappush(r, -heapq.heappushpop(l,-q1))
            else:
                heapq.heappush(l, -heapq.heappushpop(r,q1))
        
        if -l[0]!=r[0]: min+=abs(tmp-q1)
        else: min+=abs(tmp-q1)-abs(-l[0]-tmp)
        tmp=-l[0]

    elif que[0]==2:
        print(tmp,min+b)

Submission status: Runtime Error

Solution code:
a, b = [i for i in input().split()]

if a >= 13:
  print(b)
elif a>=6 and a<=12:
  print(b/2)
else:
  print(0)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a>12:
  print(str(b))
elif a<6:
  print(str(0))
else:
  print(str(b/2)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
if a>12:
  print(str(b))
elif a<6:
  print(str(0))
else:
  print(str(b/2)

Submission status: Runtime Error

Solution code:
import sys
import bisect
Q = int(input().rstrip())
#queries = []
#for _ in range(Q):
#    queries.append(list(map(int, input().rstrip().split(" "))))

bias = 0
vs = []

qi = 0
#for query in queries:
#    if len(query) == 3:
#        _, v, b = query
for _ in range(Q):
    query = input()
    if query[0] == "1":
        v, b = map(int, query[2:].split(" "))
        qi += 1
        bisect.insort_left(vs, v)
        bias += b
        if qi == 1:
            abs_sum = 0
            med = v
            medp = 0
        else:
            if qi % 2 == 0:
                if v <= med:
                    # * ^ + -> v * ^ + -> v ^ + +
                    #       -> * v ^ + -> * ^ + +
                    # medp -> same
                    # med -> new
                    # abs_sum -> += abs(new_med - med) + abs(new_med - v) = (med - new_med) + (new_med - v) = med - v
                    abs_sum += med - v
                    med = vs[medp]
                else:
                    # * ^ + -> * ^ + v
                    #       -> * ^ v +
                    # medp -> same
                    # med -> same
                    # abs_sum -> += abs(med - v) = v - med
                    abs_sum += v - med
            else:
                if v <= med:
                    # * ^ + + -> v * ^ + +
                    #         -> * v ^ + +
                    # ^ + -> v ^ +
                    # medp -> += 1
                    # med -> same
                    # abs_sum -> += abs(med - v) = med - v
                    abs_sum += med - v
                    medp += 1
                else:
                    # * ^ + + -> * ^ + + v -> * * ^ + v
                    #         -> * ^ v + + -> * * ^ + +
                    # medp -> += 1
                    # med -> new
                    # abs_sum -> += abs(new_med - v) = v - new_med
                    medp += 1
                    med = vs[medp]
                    abs_sum += v - med
    else:
        print(med, abs_sum+bias)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
if (A >= 13):
  print(B)
elif (6 <= A <= 12):
  print(B/2)
else:
  print("0")

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
a = [int(i) for i in input().split()]
a.sort()
for i in range(m):
    b,c = map(int,input().split())
    if a[0] < b:
        for j in range(b):
            a[j] = max(a[j],c)
    a.sort()
print(sum(a))

Submission status: Runtime Error

Solution code:
def wheel(a,b):
    if a>=13:
        return b
    if a>=6 and a<=12:
        return b/2
    if a<6:
    return 0   
a,b = map(int, input().split())
print(wheel(a,b))