AtCoder Beginner Contest 127 - Ferris Wheel

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-----
30 100

-----Sample Output-----
100

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

Source: atcoder | Difficulty: EASY


Solutions:
def LI():
	return list(map(int, input().split()))
(A, B) = LI()
if A >= 13:
	ans = B
elif A > 5:
	ans = B // 2
else:
	ans = 0
print(ans)


(A, B) = map(int, input().split())
if A < 13:
	B = B // 2
if A <= 5:
	B = 0
print(B)


rStr = input()
A = int(rStr.split(' ')[0])
B = int(rStr.split(' ')[1])
result = 0
if 13 <= A:
	result = B
elif A <= 5:
	result = 0
else:
	result = int(B / 2)
print(result)


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


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


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


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


(a, b) = map(int, input().split())
print(0 if a < 6 else b // 2 if a < 13 else b)


(a, b) = list(map(int, input().split()))
print(b) if a > 12 else print(int(b / 2 * bool(int(a / 6))))


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


(a, b) = [int(i) for i in input().split()]
print(0 if a < 6 else b // 2 if a < 13 else b)


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


(a, b) = list(map(int, input().split()))
print(b * (a >= 13) + int(b / 2) * (6 <= a and a <= 12))


(age, price) = map(int, input().split())
print(price * (min(1, age // 13) + min(1, age // 6)) // 2)


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


(A, B) = [int(i) for i in input().split()]
print(B if A >= 13 else B // 2 if A >= 6 else 0)


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


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


(a, b) = map(int, input().split())
print((a >= 13) * b or (6 <= a) * b // 2)


(n, m) = map(int, input().split())
if n <= 5:
	m = 0
elif n <= 12:
	m = m // 2
print(m)


(A, B) = map(int, input().split())
if A <= 12:
	B //= 2
if A < 6:
	B = 0
print(B)


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

def __starting_point():
	main()
__starting_point()


lst = input()
lst = lst.split()
for i in range(len(lst)):
	lst[i] = int(lst[i])
if lst[0] >= 13:
	print(lst[1])
elif lst[0] < 6:
	print(0)
else:
	print(int(lst[1] / 2))


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


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


(A, B) = [int(x) for x in input().split()]
print(B if A >= 13 else 0 if A <= 5 else B // 2)


(a, b) = map(int, input().split())
print([[0, b // 2][a > 5], b][a > 12])


(a, b) = [int(x) for x in input().split()]
res = b
if a <= 5:
	res = 0
elif a <= 12:
	res //= 2
print(res)


(age, fee) = map(int, input().split())
if age >= 13:
	print(fee)
elif 6 <= age <= 12:
	print(fee // 2)
else:
	print(0)


def solver():
	(A, B) = [int(n) for n in input().split()]
	if A <= 5:
		return 0
	if 6 <= A <= 12:
		return B // 2
	if 13 <= A:
		return B

def __starting_point():
	print(solver())
__starting_point()


print((lambda a, b: b if a > 12 else b // 2 if a > 5 else 0)(*map(int, input().split())))


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


(y, c) = map(int, input().split())
res = c
if y <= 5:
	res = 0
elif y <= 12:
	res = c // 2
print(res)


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


(a, b) = map(int, input().split())
print((a > 5) * b // -~(a < 13))


(A, B) = [int(x) for x in input().split()]
print(0 if A <= 5 else B // 2 if 6 <= A <= 12 else B)


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


(n, m) = map(int, input().split())
if n >= 13:
	print(m)
elif n >= 6:
	print(m // 2)
else:
	print(0)


(a, b) = [int(x) for x in input().split()]
if a < 6:
	b = 0
elif a < 13:
	b //= 2
print(b)


(A, B) = map(int, input().split())
print(B) if A >= 13 else print(int(B * 0.5)) if 6 <= A <= 12 else print(0)


(N, M) = (int(i) for i in input().split(' '))
print(int(0 if N < 6 else M if N > 12 else M / 2))


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


(a, b) = map(int, input().split())
print(b // (13 // min(a + 1, 14) + 1) * min(1, a // 6))


(x, y) = map(int, input().split())
if x <= 5:
	print(0)
elif x <= 12:
	print(y // 2)
else:
	print(y)


(n, k) = map(int, input().split())
if n > 12:
	print(k)
elif n > 5:
	print(k // 2)
else:
	print(0)


(a, b) = map(int, input().split())
print([b, b // 2, 0][(13 > a) + (6 > a)])


(a, b) = (int(i) for i in input().split())
if a > 12:
	print(b)
elif a < 6:
	print(0)
else:
	print(b // 2)


(n, b) = list(map(int, input().split()))
print(b if n >= 13 else b // 2 if n >= 6 and 12 >= n else 0)


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


(a, b) = [int(x) for x in input().split()]
print(b if a >= 13 else b // 2 if 6 <= a <= 12 else 0)


(A, B) = [int(n) for n in input().split()]
print(B if A >= 13 else B // 2 if 6 <= A <= 12 else 0)


(A, B) = map(int, input().split())
P = B - 0.5 * B * (A < 13)
P = P * (A > 5)
print(int(P))


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


(a, b) = list(map(int, input().split()))
m = 0
if a > 12:
	m = b
elif a > 5:
	m = b // 2
print(m)


(A, B) = map(int, input().split())
print(B // -~(A < 13) * (A > 5))


(a, b) = list(map(int, input().split()))
if a >= 13:
	print(b)
if 6 <= a <= 12:
	print(b // 2)
if a < 6:
	print(0)


(a, b) = map(int, input().split())
if a <= 5:
	ans = 0
elif 6 <= a <= 12:
	ans = b * 0.5
else:
	ans = b
print(int(ans))


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


(a, b) = map(int, input().split())
print(b * (a > 12) + b * (5 < a < 13) // 2)


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


(n, p) = map(int, input().split())
if n < 6:
	print(0)
elif 5 < n < 13:
	print(p // 2)
else:
	print(p)


import sys
(A, B) = map(int, sys.stdin.readline().split())
if A <= 5:
	print(0)
elif A <= 12:
	print(B // 2)
else:
	print(B)


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


(s, o) = (int(x) for x in input().split())
if s > 12:
	y = o
elif s > 5:
	y = o // 2
else:
	y = 0
print(y)


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