AtCoder Beginner Contest 147 - Blackjack

Given are three integers A_1, A_2, and A_3.
If A_1+A_2+A_3 is greater than or equal to 22, print bust; otherwise, print win.

-----Constraints-----
 - 1 \leq A_i \leq 13 \ \ (i=1,2,3)
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
A_1 A_2 A_3

-----Output-----
If A_1+A_2+A_3 is greater than or equal to 22, print bust; otherwise, print win.

-----Sample Input-----
5 7 9

-----Sample Output-----
win

5+7+9=21, so print win.

Difficulty: EASY

Starter code:

Solutions:
(a, b, c) = map(int, input().split())
print('bust' if a + b + c > 21 else 'win')


(A1, A2, A3) = map(int, input().split())
if A1 + A2 + A3 <= 21:
	print('win')
else:
	print('bust')


a = list(map(int, input().split()))
if a[0] + a[1] + a[2] <= 21:
	print('win')
else:
	print('bust')


s = sum((int(x) for x in input().split()))
print('bust' if s >= 22 else 'win')


A = list(map(int, input().split()))
print('win' if sum(A) <= 21 else 'bust')


a = map(int, input().split())
print('bust' if sum(a) >= 22 else 'win')


(*a,) = map(int, open(0).read().split())
print('bwuisnt'[sum(a) < 22::2])


(*A,) = map(int, input().split())
print('bust' if sum(A) >= 22 else 'win')


(a, b) = (sum((int(x) for x in input().split())), ['win', 'bust'])
print(b[int(a / 22)])


sum_list = sum(map(int, input().split()))
print('win') if sum_list <= 21 else print('bust')


(a1, a2, a3) = map(int, input().split())
print(['win', 'bust'][a1 + a2 + a3 >= 22])


a = map(int, input().split())
print('win' if sum(a) <= 21 else 'bust')


print('bust' if sum((int(_) for _ in input().split())) > 21 else 'win')


a = sum([int(_) for _ in input().split()])
print('bust' if a >= 22 else 'win')


(A, B, C) = map(int, input().split())
print('win' if A + B + C <= 21 else 'bust')


A = eval(input().replace(' ', '+'))
print('bust' if A >= 22 else 'win')


a = sum(list(map(int, input().split())))
print('bwuisnt'[a <= 21::2])


s = sum(list(map(int, input().split())))
if s >= 22:
	print('bust')
else:
	print('win')


ans = sum(map(int, input().split()))
if ans > 21:
	print('bust')
else:
	print('win')


print('win' if eval(input().replace(' ', '+')) <= 21 else 'bust')


aaa = sum(map(int, input().split()))
print('bust' if aaa >= 22 else 'win')


(a1, a2, a3) = map(int, input().split())
print('bust' if a1 + a2 + a3 > 21 else 'win')


A = [int(i) for i in input().split()]
if A[0] + A[1] + A[2] >= 22:
	print('bust')
if A[0] + A[1] + A[2] < 22:
	print('win')


import math
import collections
ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))
(a, b, c) = mi()
if a + b + c >= 22:
	print('bust')
else:
	print('win')


print(('bust', 'win')[eval(input().replace(' ', '+')) < 22])


s = sum(map(int, input().split()))
print('bwuisnt'[s <= 21::2])


(a, s, d) = map(int, input().split())
if a + s + d >= 22:
	print('bust')
else:
	print('win')


t = sum(map(int, input().split()))
print('bust') if t >= 22 else print('win')


ans = sum(map(int, input().split()))
print('bust' if ans >= 22 else 'win')


(a, b, c) = map(int, input().split())
print(('win', 'bust')[a + b + c > 21])


print(['win', 'bust'][sum(list(map(int, input().split()))) >= 22])


(a, b, c) = (int(x) for x in input().split())
print('bust' if a + b + c >= 22 else 'win')


(A, B, C) = tuple(map(int, input().split()))
print('bust' if A + B + C >= 22 else 'win')


A = map(int, open(0).read().split())
print('win' if sum(A) <= 21 else 'bust')


(a, a1, a2) = map(int, input().split())
if a + a1 + a2 >= 22:
	print('bust')
else:
	print('win')


print('bwuisnt'[sum(list(map(int, input().split()))) < 22::2])


(a, b, c) = map(int, input().split())
print('bwuisnt'[a + b + c < 22::2])


n = map(int, input().split())
print('bust' if sum(n) >= 22 else 'win')


(a, b, c) = list(map(int, input().split()))
if a + b + c >= 22:
	print('bust')
elif a + b + c <= 21:
	print('win')


A = list(map(int, input().split()))
print('bwuisnt'[sum(A) <= 21::2])


(A, B, C) = map(int, input().split())
print(('bust', 'win')[A + B + C < 22])


(a, b, c) = map(int, input().split())
k = a + b + c
print('bust' if k >= 22 else 'win')


(a, b, c) = list(map(int, input().split()))
ans = 0
ans = a + b + c
if ans > 21:
	print('bust')
else:
	print('win')


a = eval(input().replace(' ', '+'))
print((a > 21) * 'bust' or 'win')


print('bwuisnt'[eval(input().replace(' ', '+')) < 22::2])


print(['bust', 'win'][sum(map(int, input().split())) <= 21])


(a1, a2, a3) = [int(n) for n in input().split()]
print('bust' if a1 + a2 + a3 >= 22 else 'win')


print(sum(map(int, input().split())) >= 22 and 'bust' or 'win')


def main():
	A = list(map(int, input().split()))
	print('win' if sum(A) <= 21 else 'bust')

def __starting_point():
	main()
__starting_point()


a = list(map(int, input().split()))
s = a[0] + a[1] + a[2]
if s >= 22:
	print('bust')
else:
	print('win')


(a, b, c) = map(int, input().split())
print(['win', 'bust'][a + b + c >= 22])


sum_A = sum(map(int, input().split()))
print('bust' if sum_A >= 22 else 'win')


def resolve():
	a = tuple(map(int, input().split()))
	print('bust' if sum(a) > 21 else 'win')
resolve()


x = sum(map(int, input().split()))
print('bust' if x > 21 else 'win')


def solve(A: 'List[int]'):
	return ['win', 'bust'][sum(A) >= 22]

def main():
	A = list(map(int, input().split()))
	answer = solve(A)
	print(answer)

def __starting_point():
	main()
__starting_point()


(L, M, N) = map(int, input().split())
print('bust' if L + M + N >= 22 else 'win')


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float('inf')
(YES, Yes, yes, NO, No, no) = ('YES', 'Yes', 'yes', 'NO', 'No', 'no')
(dy4, dx4) = ([0, 1, 0, -1], [1, 0, -1, 0])
(dy8, dx8) = ([0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1])

def inside(y, x, H, W):
	return 0 <= y < H and 0 <= x < W

def ceil(a, b):
	return (a + b - 1) // b

def sum_of_arithmetic_progression(s, d, n):
	return n * (2 * s + (n - 1) * d) // 2

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	g = gcd(a, b)
	return a / g * b

def solve():
	(A1, A2, A3) = list(map(int, input().split()))
	if A1 + A2 + A3 >= 22:
		print('bust')
	else:
		print('win')

def main():
	solve()

def __starting_point():
	main()
__starting_point()


l = [int(i) for i in input().split()]
print('win' if sum(l) <= 21 else 'bust')


print('win' if sum([int(i) for i in input().split()]) < 22 else 'bust')


a = map(int, input().split())
print('bwuisnt'[sum(a) < 22::2])


(x, y, z) = map(int, input().split())
print('win' if x + y + z <= 21 else 'bust')


print('bwuisnt'[sum(map(int, open(0).read().split())) <= 21::2])


(A1, A2, A3) = map(int, input().split())
t = A1 + A2 + A3
if t >= 22:
	print('bust')
else:
	print('win')


(A, b, C) = map(int, input().split())
if A + b + C < 22:
	print('win')
else:
	print('bust')


A = map(int, input().split())
print(['win', 'bust'][22 <= sum(A)])


A = [int(x) for x in input().split()]
print('bust' if sum(A) > 21 else 'win')


n = sum(map(int, input().split()))
print('bust' if n > 21 else 'win')


s = sum(map(int, input().split()))
print('bust' if s > 21 else 'win')


print('bust' if sum(map(int, input().strip().split())) >= 22 else 'win')


(a1, a2, a3) = map(int, input().split())
ans = a1 + a2 + a3
if ans >= 22:
	print('bust')
else:
	print('win')


(n, a, b) = map(int, input().split())
print('bust' if n + a + b >= 22 else 'win')


(a_1, a_2, a_3) = map(int, input().split())
sum = a_1 + a_2 + a_3
if sum > 21:
	print('bust')
else:
	print('win')


S = sum(map(int, input().split()))
print('win' if S <= 21 else 'bust')