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 13<=A:
    ans=B
elif 6<=A:
    ans=B/2S
else:
    ans = 0

print(ans)

Submission status: Runtime Error

Solution code:
g=lambda:map(int,input().split())
_,m=g()
ml,mr=0,10**5
for _ in range(m):
    l,r=g()
    ml=max(ml,l)
    mr=min(mr,r)
print([0,mr-ml+1][mr>=ml])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(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())
gateInfos = [list(map(int,input().split()))for i in range(M)]
c = 0

cards = [True]*N

for g in gateInfos:
  L = g[0]
  R = g[1]
  for i in range(L-1):
    cards[i] = False
  for i in range(R,N):
    cards[i] = False
print(cards.count(True))

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:
import sys
input = sys.stdin.readline
import bisect
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
#Query = []
#for _ in range(m):
#    b,c = map(int,input().split())
#    Query.append([c,b])
#Query.sort(reverse=True)
Query = [list(map(int,input().split())) for _ in range(m)]
Query = sorted(Query, key=lambda x:(x[1], x[0]), reverse=True)
ans = 0
for b,c in Query:
    #b,c = Query[i][1],Query[i][0]
    #b,c = Query[i][0],Query[i][1]
    if A[0] >= c:
        break
    else:
        #A.sort()
        index = bisect.bisect_left(A,c)
        ans += sum(A[index:])
        if b <= index:
            #for i in range(b):
            #    A[i] = c
            A = A[b:index].extend([c for i in range(b)])
        else:
            #for i in range(index):
            #    A[i] = c
            A = [ c for i in range(index)]
    #print(A)
print(ans + sum(A))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import bisect
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
Query = [list(map(int,input().split())) for _ in range(m)]
Query = sorted(Query, key=lambda x:(x[1], x[0]), reverse=True)
for b,c in Query:
    if A[0] >= c:
        break
    else:
        index = bisect.bisect_left(A,c)
        if b <= index:
            A = A[b:index] + [c for i in range(b)] + A[index:]
        else:
            A = [ c for i in range(index)] + A[index:]
print(sum(A))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import bisect
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
Query = []
for _ in range(m):
    b,c = map(int,input().split())
    Query.append([c,b])
Query.sort(reverse=True)
for i in range(m):
    b,c = Query[i][1],Query[i][0]
    if A[0] >= c:
        break
    else:
        #A.sort()
        index = bisect.bisect_left(A,c)
        if b <= index:
            #for i in range(b):
            #    A[i] = c
            A = A[b:index] + [c for i in range(b)] + A[index:]
        else:
            #for i in range(index):
            #    A[i] = c
            A = [ c for i in range(index)] + A[index:]
    #print(A)
print(sum(A))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(M):
    B,C = map(int, input().split())
    for j in range(B) :
        if  C >= A[j] : 
            A[j] = C
        else :
            continue
    A.sort()
sum = 0 
for i in range(N):
    sum += A[i] 

print(sum)

Submission status: Runtime Error

Solution code:
age,cost =list(map(int, input().split()))
if age<=5:
  print('0')
elif age>=6 and age<=12:
  print(a//2)
elif age>=13:
  print(a)

Submission status: Runtime Error

Solution code:
age,cost= list(map(int, input().split()))
if 0<age<100 and 2<cost<1000:
	if age<=5:
      print('0')
	elif age>=6 and age<=12:
      print(a/2)
	else:
  	  print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
age,cost=list(map(int, input().split()))
age=x[0]
cost=x[1]
if age<=5:
  print('0')
elif age>=6 and age<=12:
  print(a/2)
else:
  print(a)

Submission status: Runtime Error

Solution code:
x=list(map(int, input()))
age=x[0]
cost=x[1]
if age<=5:
  print('0')
elif age>=6 and age<=12:
  print(a/2)
else:
  print(a)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().sprit())
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 A >= 13:
    print(b)
elif 6<=A:
    print(b/2)
else:
    print(0)

Submission status: Runtime Error

Solution code:
a=input('A: ')
b=input('B: ')
if a>5 and a<13:
  print(b*2)
else:
  print(b)

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

Submission status: Runtime Error

Solution code:
age,money=map(float, input().split())
assert 1<=age<=100 and 2<=money<=1000 and money%2==0
if age<=5:
    print('0')
elif 6<=age<=12:
    print(money/2)
else:
    print(money)

Submission status: Runtime Error

Solution code:
age,money=map(int, input().split())
assert 1<=age<=100 and 2<=money<=1000 and money%2==0
if age<=5:
    print('0')
elif 6<=age<=12:
    print(money/2)
else:
    print(money)

Submission status: Runtime Error

Solution code:
age,money=map(int, input().split())
assert 1<=age<=100 and 2<=b<=1000 and b%2==0
if age<=5:
    print('0')
elif 6<=age<=12:
    print(money/2)
else:
    print(money)

Submission status: Runtime Error

Solution code:
age,money=map(int, input()).split()
assert 1<=age<=100 and 2<=b<=1000 and b%2==0
if age<=5:
    print('0')
elif 6<=age<=12:
    print(money/2)
else:
    print(money)

Submission status: Runtime Error

Solution code:
age,money=map(int, input()).split()
assert 1<=age<=100 and 2<=b<=1000 and b%2==0
if age<=5:
	print('0')
elif 6<=age<=12:
  	print(money/2)
else:
  	print(money)

Submission status: Runtime Error

Solution code:
if a>13:
  print("your cost is 100yen")
  elif a>6 and a<=12:
    print("you have to pay 50yen")
    elif a<=5:
      print("you can go for free")

Submission status: Runtime Error

Solution code:
A = int(input('Enter your age : '))
B = int(input('Enter the cost : '))

if A >= 13:
  price = B
elif 6 <= A <= 12:
  price = B/2
else:
  price = 0

print(price)

Submission status: Runtime Error

Solution code:
A=int(input("enter age:"))
if 13<=A<=100:
  print(100)
if 6<=A<=12:
  print(100/2)
if 1<=A<=5:
  print("free")

Submission status: Runtime Error

Solution code:
A=int(input("enter age:"))
if 13<=A<=100:
  print(100)
if 6<=A<=12:
  print(100/2)
if 1<=A<=5:
  print("free")

Submission status: Runtime Error

Solution code:
A = 15
B = 200

if a >= 13:
  price = B
elif 6 <= A <= 12:
  price = B/2
else:
  price = 0

print(price)

Submission status: Runtime Error

Solution code:
a = int(input("")
b = int(input("")
if b%2==0:
        if a>=13:
          print(b)
        elif 6<=a<=12:
          print(b/2)
        elif a<=5:
          print(0)

Submission status: Runtime Error

Solution code:
a = int(input(""))
b = int(input(""))
if b % 2==0:
   if a>=13:
          print(b)
   elif 6<=a<=12:
          print(b/2)
   elif a<=5:
          print(0)

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
r,D,x=map(int,input().split())
for _ in range(10):
    x=r*x-D
    print(x)

Submission status: Runtime Error

Solution code:
a= int(input())
b= int(input())
if a>12:
  print(int(b))
elif a>5 and b%4==0:
  print(int(b/2))
elif a>5 and b%4!=0:
  print(b/2)
elif a>-1:
  print(0)

Submission status: Runtime Error

Solution code:
age, max_money = int(input().split())
if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0")

Submission status: Runtime Error

Solution code:
A=input("Enter Age")
B=input("Enter Fee")
if B%2==0 and (B>=2 and B<= 1000) and (A>=0 and A<=100):
	if A>=13:
		print(B)
	elif A>=6 and A<=12:
		print(int(B/2))
	elif A<=5:
		print(0)
else:
	print("Error")

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
age,fee=map(int,input().split())

if age>=13:
    print(fee)
elif age<13 and age>=6:
    print(int(fee/2))
else:
    prrint(0)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if a >= 13:
  print(b)
  end()
  
if a >= 6:
  b /= 2
  print(b)
  end()
  
print(0)

Submission status: Runtime Error

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

if a >= 13:
  print(b)
  end()
  
if a >= 6:
  b /= 2
  print(b)
  end()
  
print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
a = int(input())

if a >= 13:
  print(a)
  sys.exit()
elif a >= 6 and a <= 12:
  print(int(a/2))
  sys.exit()
else:
  print(0)

Submission status: Runtime Error

Solution code:
import sys
a = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
l=[]
r=[]
for i in range(m):
    strl,strr=map(int,input().split())
    l.append(strl)
    r.append(strr)
num1=max(l)
num2=min(r)
if num1>num2:
    print(0)
else:
    print(num2-num1+1)

Submission status: Runtime Error

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

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)
elif: A<=5:
  print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    import math
    #from math import gcd

    #inf = 10**17
    mod = 10**9 + 7

    # max_nCrまで調べられる
    max_n = 4*10**5
    fac, inv = [1]*(max_n+1), [0]*(max_n+1)
    for i in range(2, max_n+1):
        fac[i] = fac[i-1] * i % mod
    inv[-1] = pow(fac[-1], mod-2, mod)
    for i in range(max_n, 0, -1):
        inv[i-1] = inv[i] * i % mod
    
    # nCrを求める
    def ncr(n, r):
        return fac[n]*inv[r]*inv[n-r]%mod

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

    base = ncr(n*m-2, k-2)

    res = 0
    # x方向
    for i in range(1, m):
        res += n**2 * i * (m-i)
        res %= mod

    for i in range(1, n):
        res += m**2 * i * (n-i)
        res %= mod

    print(res*base%mod)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(b//(12//min(a, 13)+1)*min(1, a//6))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(b//(12//min(a, 13)+1)*(min(1, a//6))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(max(b//(7//min(a-5, 8)+1), 0))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def main():
    inp=list(map(lambda x:int(x),input().split()))
    A=inp[0]
    B=inp[1]

    res=B
    if 6<=B=<12:
        res=res//2
    elif B<=5:
        res=0

    print(res)

if __name__=="__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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) a,b = map(int,input().split())
if a>=13:
	print(b)
elif a<=5:
	print('a')
else:
	print(b/2)

Submission status: Runtime Error

Solution code:
# coding: utf-8
import re
import math
from collections import defaultdict
from collections import deque
import itertools
from copy import deepcopy
import random
import time
import os
import queue
import sys
import datetime
from functools import lru_cache
#@lru_cache(maxsize=None)
readline=sys.stdin.readline
sys.setrecursionlimit(2000000)
#import numpy as np
alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_power(a,b):#aはbの累乗数か
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def get_facs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    if n==0:
        if type=="int":return []
        else:return [False]
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=""):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def floor_(n,x=1):
    return x*(n//x)
def ceil_(n,x=1):
    return x*((n+x-1)//x)
def hani(x,min_,max_):
    ret=x
    if x<min_:ret=min_
    if x>max_:ret=max_
    return ret
def seifu(x):
    return x//abs(x)
###################################################
def main():
    N,M=list(map(int,list(input().split())))
    sset=set()
    for a in range(M):
        l,r=map(int,input().split())
        if a==0:
            sset=set(range(l,r+1))
        else:
            sset=sset&set(range(l,r+1))
    print(len(sset))
main()

Submission status: Runtime Error

Solution code:
from bisect import bisect_left

n,m = map(int,input().split())
a = list(map(int,input().split()))
bc = []
for _ in range(m):
	bc.append(list(map(int,input().split())))

a.sort()
bc = sorted(bc, key=lambda x:x[1])

l = [0 for _ in range(n+1)]
for i in range(1,n+1):
	l[i] = a[i-1]
for i in range(n):
	l[i+1] += l[i]

ans = l[-1]
num = 0
while True:
	if len(bc) == 0:
		break
	tmp = bc.pop()
	b = tmp[0]
	c = tmp[1]
	index = bisect_left(a,c)

	if index == 0:
		break
	if b >= index:
		ans -= l[index+num] - l[num]
		ans += index * c
		break
	else:
		ans -= l[b]
		ans += b * c
		a = a[b:]
		num += b

print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

N, M = map(int, input().split())

A_list = list(map(int, input().split()))

R_list = []

for _ in range(M):
  B, C = map(int, input().split())
  BC_list = [C]*B
  R_list.extend(BC_list)

R_list = np.array(R_list)
R_list = np.sort(R_list)
R_list = R_list[::-1]
R_list = R_list[:N]

A_list = np.array(A_list)
R_list = np.sort(A_list)

print(np.sum(np.maximum(A_list,R_list)))

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
a = []
b = []
for i in range(M):
    x,y = map(int,input().split())
    a.append(x)
    b.append(y)
if max(a) <= min(b):
    print(min(y)-max(x)+1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
# ABC127A

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 = int(input())
b = int(input())
if a >= 13:
	print(b)
elif a >= 6:
	print(b / 2)
else:
	print(0)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
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 <= 12 and A >= 6:
  print(B/2)
eiif A < 6:
  print(0)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a,p=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 6 <= a <= 12:
  print(b // 2)
else:
  print(0)

Submission status: Runtime Error

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

A.sort()
C.sort(reverse=True)
j = 0
while (j < len(C)) and (A[j] < C[j]):
  A[j] = C[j]
  j += 1
  
print(sum(A))

Submission status: Runtime Error

Solution code:
import sys 

A, B = int(input()).split()
cond_older = (13 > A)
cond_young = (6 <= A) & (13 >= A)

ans = (
  B if cond_older else
  B//2 if cond_young else
  0
)

print(ans)

Submission status: Runtime Error

Solution code:
N, M = map( int, input().split() )
a = list( map( int, input().split() ) )
 
d = []
for i in range( M ):
  b, c = map( int, input().split() )
  d += [ c ] * b
d.sort()
a += d
a.sort()
print(sum(a[-N:]))

Submission status: Runtime Error

Solution code:
def resolve():
    N, M = map(int, input().split())
    d = Counter(list(map(int, input().split())))

    for i in range(M):
        b, c = map(int, input().split())
        d[c] += b

    d = dict(sorted(d.items(), reverse=True))

    def main():
        cnt = 0
        ans = 0

        for k, v in d.items():
            if cnt + v < N:
                ans += v * k
                cnt += v
            else:
                ans += (N - cnt) * k
                return ans

    print(main())



resolve()

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)
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 A >= 13:
	print(B)
elif 6<=A<=12
	print(B//2)
else:
    print(0)

Submission status: Runtime Error

Solution code:
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:
import sys

def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_array(): return list(get_ints())
def input(): return sys.stdin.readline().strip().split()

a, b = get_ints():
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 A>13
print(B)
if 5<A<13
print(B/2)
if A<6
print(0)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
Alist = list(map(int, input().split()))
BClist = []
for i in range(M):
    B, C = map(int, input().split())
    BClist.append([B, C])
Alist.sort()
BClist.sort(reverse=True, key=lambda x: x[1])

num = 0
flag = True
for i in range(M):
    if not flag:
        break
    for j in range(BClist[i][0]):
        if num >= len(Alist):
            flag = False
            break
        elif BClist[i][1] > Alist[num]:
            Alist[num] = BClist[i][1]
            num += 1
        elif BClist[i][1] <= Alist[num]:
            flag = False
            break

print(sum(Alist))

Submission status: Runtime Error

Solution code:
import heapq

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

for i in range(m):
    b , c = map(int,input().split())
    for j in range(b):
        p = heapq.heappop(a)
        if p >= c:
            heapq.heappush(a,p)
            break
        else:
            heapq.heappush(a,c)

print(sum(a))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
N,M,K = list(map(int, input().split()))

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))%1000000007

print(comb(N*M-2,K-2)*M*N*(M*(N**2-1)+N*(M**2-1))//6%1000000007)

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
if a >= 13:
    print(b)
elif 5 <= 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 5 <= 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 5 <= a <= 12:
    print(a//2)
else:
    print(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:
    prnt(0)

Submission status: Runtime Error

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

if 6 <= A <= 12:
  B = B / 2
elif 5 => B:
  B = 0
else:
  psss

print(int(B))

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value

def main():
    N, M = mi()
    A = sorted(li())

    for j in range(M):
        b, c = mi()
        ind = min(bisect.bisect_left(A, c), b)
        A = sorted([c]*ind + A[ind:])
    
    print(sum(A))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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 b > 12:
  print(b)
elif: b > 5:
  print(int(b/2))
else:
  print(0)

Submission status: Runtime Error

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

ans = b
if a <= 5:
  ans = 0
elif a <= 12:
  ans = b/s

print(ans)

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if A >= 13:
  print(B)
elif A <=5:
  print("0")
else:
  print(str(B//2))

Submission status: Runtime Error

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

if 6 <= A <= 12 :
	amswer = B / 2
elif A <=5 :
	answer = 0
else:
answer = B

print(answer)

Submission status: Runtime Error

Solution code:
if Age>=13:
  print(Fee)
elif Age<13 and Age>=6:
  print(Fee//2)
else:
  print(0)

Submission status: Runtime Error

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

if a >= 13:
  print(b)
elif: a =< 5:
    print(0)
else:
  print(int(b/2))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
age, price = (int(x) for x in input().split(' '))

if age <= 5:
    print('0')
elif age >= 6 & age <= 12:
    print(f'{price // 2}')
else:
    print(f'{price}')

Submission status: Runtime Error

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

if a >= 13:
    ans = b
if 6 <= a < 13:
    ans = b//2
if a < 5:
    ans = 0
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
ort sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
 
A, B = MAP()
 
if A >= 13:
  print(B)
  exit()
if A <= 5:
  print(0)
  exit()
print(B//2)

Submission status: Runtime Error

Solution code:
number = input().split(" ")
A = int(number[0])
B = int(number[1])
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())
min_ID = 0
max_ID = N
for _ in range(M):
    L, R = map(int, input().split())
    if min_ID < L:
        min_ID = L
    if max_ID > R:
        max_ID = R

if max_ID < min_ID:
    print(0)
else:
    print(max_ID - min_ID + 1)

Submission status: Runtime Error

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