AtCoder Beginner Contest 054 - One Card Poker

Alice and Bob are playing One Card Poker.

One Card Poker is a two-player game using playing cards.  
Each card in this game shows an integer between 1 and 13, inclusive.

The strength of a card is determined by the number written on it, as follows:  
Weak 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 < 10 < 11 < 12 < 13 < 1 Strong  
One Card Poker is played as follows:  
 - Each player picks one card from the deck. The chosen card becomes the player's hand.
 - The players reveal their hands to each other. The player with the stronger card wins the game.
If their cards are equally strong, the game is drawn.  
You are watching Alice and Bob playing the game, and can see their hands.

The number written on Alice's card is A, and the number written on Bob's card is B.

Write a program to determine the outcome of the game.  

-----Constraints-----
 - 1≦A≦13 
 - 1≦B≦13 
 - A and B are integers.

-----Input-----
The input is given from Standard Input in the following format:
A B

-----Output-----
Print Alice if Alice will win. Print Bob if Bob will win. Print Draw if the game will be drawn.

-----Sample Input-----
8 6

-----Sample Output-----
Alice

8 is written on Alice's card, and 6 is written on Bob's card.
Alice has the stronger card, and thus the output should be Alice.

Difficulty: EASY

Starter code:

Solutions:
(A, B) = map(int, input().split())
cA = (A + 12) % 14
cB = (B + 12) % 14
if cA > cB:
	print('Alice')
elif cA == cB:
	print('Draw')
else:
	print('Bob')


(a, b) = ((int(x) - 2) % 100 for x in input().split())
print('Draw' if a == b else 'Alice' if a > b else 'Bob')


(a, b) = map(int, input().split())
(a, b) = ((a + 13) % 15, (b + 13) % 15)
print('Alice' if a > b else 'Bob' if a < b else 'Draw')


(a, b) = map(int, input().split())
print(['ADlriacwe'[a == b::2], 'Bob'][(a - 2) % 13 < (b - 2) % 13])


(A, B) = map(int, input().split())
if A == 1 and 13 >= B >= 2:
	print('Alice')
elif B == 1 and 13 >= A >= 2:
	print('Bob')
elif A > B:
	print('Alice')
elif B > A:
	print('Bob')
elif A == B:
	print('Draw')


(a, b) = map(int, input().split())
if a == b:
	print('Draw')
elif b != 1 and (a > b or a == 1):
	print('Alice')
else:
	print('Bob')


(A, B) = map(int, input().split())
if A == B:
	print('Draw')
elif A == 1:
	print('Alice')
elif B == 1:
	print('Bob')
elif A > B:
	print('Alice')
elif B > A:
	print('Bob')


(A, B) = map(int, input().split())
print('Draw' if A == B else 'Bob' if (A + 13) % 15 < (B + 13) % 15 else 'Alice')


(a, b) = [int(a) for a in input().split()]
if a == b:
	print('Draw')
elif a == 1:
	print('Alice')
elif b == 1:
	print('Bob')
elif a > b:
	print('Alice')
else:
	print('Bob')


(A, B) = [int(i) + 13 * (i == '1') for i in input().split()]
print(['Draw', 'Alice', 'Bob'][(B > A) + (B != A)])


(a, b) = map(int, input().split())
h = [0, 14] + list(range(2, 14))
if a == b:
	print('Draw')
else:
	print('Alice' if h[a] > h[b] else 'Bob')


(a, b) = map(int, input().split())
print('Draw' if a == b else 'Alice' if (a + 12) % 14 > (b + 12) % 14 else 'Bob')


(a, b) = map(int, input().split())
(a, b) = (a + 13 * (a < 2), b + 13 * (b < 2))
if a > b:
	print('Alice')
elif a < b:
	print('Bob')
else:
	print('Draw')


(A, B) = map(int, input().split())
if A == B:
	print('Draw')
elif A == 1 or (A > B and B != 1):
	print('Alice')
else:
	print('Bob')


(a, b) = map(int, input().split())
st_l = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]
if st_l.index(a) > st_l.index(b):
	print('Alice')
elif st_l.index(a) < st_l.index(b):
	print('Bob')
else:
	print('Draw')


(aris_card, bob_card) = map(int, input().split())
if aris_card == 1:
	aris_card += 13
if bob_card == 1:
	bob_card += 13
if aris_card == bob_card:
	print('Draw')
elif aris_card > bob_card:
	print('Alice')
elif aris_card < bob_card:
	print('Bob')


(input_alice, input_bob) = list(map(int, input().split()))
result = 'ret'
if input_alice > input_bob:
	if input_bob == 1:
		result = 'Bob'
	else:
		result = 'Alice'
elif input_alice < input_bob:
	if input_alice == 1:
		result = 'Alice'
	else:
		result = 'Bob'
else:
	result = 'Draw'
print(result)


(card_A, card_B) = list(map(int, input().split()))
if card_A == 1:
	card_A = 14
if card_B == 1:
	card_B = 14
if card_A > card_B:
	print('Alice')
elif card_A < card_B:
	print('Bob')
elif card_A == card_B:
	print('Draw')


(A, B) = list(map(lambda x: x + 13 if x == 1 else x, map(int, input().split())))
print('Alice' if A > B else 'Bob' if A < B else 'Draw')


(a, b) = input().split()
(a, b) = (int(a), int(b))
if a == 1:
	a = 14
if b == 1:
	b = 14
if a > b:
	print('Alice')
elif a < b:
	print('Bob')
else:
	print('Draw')


(a, b) = map(int, input().split())
if a < 2:
	a = 14
if b < 2:
	b = 14
print('ADBlroiabcw e'[(a == b) + (a < b) * 2::3])


c = list(map(str, range(2, 14))) + ['1']
(A, B) = map(c.index, input().split())
print('Draw' if A == B else 'Alice' if A > B else 'Bob')


(A, B) = map(int, input().split())
if A == 1:
	A = 14
if B == 1:
	B = 14
ans = 'Alice' if A > B else 'Bob' if A < B else 'Draw'
print(ans)


x = 'xmabcdefghijkl'
(a, b) = map(int, input().split())
print('Draw' if a == b else 'Alice' if x[a] > x[b] else 'Bob')


(a, b) = [14 if x == 1 else x for x in map(int, input().split())]
print('Alice' if a > b else 'Draw' if a == b else 'Bob')


(a, b) = map(int, input().split())
if a == b:
	print('Draw')
elif a == 1:
	print('Alice')
elif b == 1:
	print('Bob')
elif a > b:
	print('Alice')
elif a < b:
	print('Bob')


(a, b) = map(int, input().split())
a = (a - 2) % 13
b = (b - 2) % 13
print('Alice' * (a > b) or 'Bob' * (b > a) or 'Draw')


(A, B) = list(map(int, input().split()))
if A == 1:
	A = 14
if B == 1:
	B = 14
if A < B:
	print('Bob')
elif A > B:
	print('Alice')
else:
	print('Draw')


(a, b) = map(int, input().split())
A = 14 if a == 1 else a
B = 14 if b == 1 else b
print('Draw' if A == B else 'Alice' if A > B else 'Bob')


(a, b) = list(map(int, input().split()))
if a == 1:
	a += 13
if b == 1:
	b += 13
if a > b:
	ans = 'Alice'
elif a < b:
	ans = 'Bob'
else:
	ans = 'Draw'
print(ans)


(a, b) = ((11 + int(s)) % 13 for s in input().split())
print('Alice' if a > b else 'Bob' if a < b else 'Draw')


(A, B) = map(int, input().split())
if A == 1:
	A = 14
if B == 1:
	B = 14
print(['ABloibc e'[A < B::2], 'Draw'][A == B])


(a, b) = list(map(int, input().split()))
if a == 1:
	a = 14
if b == 1:
	b = 14
print('Alice' if a > b else 'Bob' if a < b else 'Draw')


import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal
import functools

def v():
	return input()

def k():
	return int(input())

def S():
	return input().split()

def I():
	return list(map(int, input().split()))

def X():
	return list(input())

def L():
	return list(input().split())

def l():
	return list(map(int, input().split()))

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 6)
mod = 10 ** 9 + 7
cnt = 0
ans = 0
inf = float('inf')
al = 'abcdefghijklmnopqrstuvwxyz'
AL = al.upper()
(A, B) = I()
if A == B:
	print('Draw')
elif A == 1:
	print('Alice')
elif B == 1:
	print('Bob')
elif A > B:
	print('Alice')
else:
	print('Bob')


S = input()
S_list = list(map(int, S.split()))
S_list = [i - 1 for i in S_list]
if S_list[0] == S_list[1]:
	result = 'Draw'
elif (S_list[0] - S_list[1]) * S_list[1] > 0 or S_list[0] == 0:
	result = 'Alice'
else:
	result = 'Bob'
print(result)


(a, b) = (int(i) for i in input().split())
print('Draw' if a == b else 'Alice' if a == 1 or (b != 1 and b < a) else 'Bob')


def main():
	(a, b) = map(int, input().split())
	if a == b:
		print('Draw')
	elif a == 1 and b != 1:
		print('Alice')
	elif a != 1 and b == 1:
		print('Bob')
	elif a > b:
		print('Alice')
	else:
		print('Bob')

def __starting_point():
	main()
__starting_point()


(A, B) = map(lambda x: (int(x) - 2) % 13, input().split())
print('Alice' if A > B else 'Draw' if A == B else 'Bob')


(x, y) = map(int, input().split())
L = list(range(2, 14)) + [1]
a = L.index(x)
b = L.index(y)
if a > b:
	print('Alice')
elif b > a:
	print('Bob')
else:
	print('Draw')


(a, b) = map(lambda x: (int(x) + 12) % 14, input().split())
if a > b:
	print('Alice')
elif a < b:
	print('Bob')
else:
	print('Draw')


(A, B) = map(int, input().split())
if A == B:
	print('Draw')
elif (A - 2) % 13 < (B - 2) % 13:
	print('Bob')
else:
	print('Alice')


(a, b) = list(map(int, input().split()))
l = [i for i in range(2, 14)] + [1]
print(['Draw', 'Alice', 'Bob'][l.index(a) > l.index(b) or -(l.index(a) < l.index(b))])


(a, b) = map(int, input().split())
f = lambda k: 14 if k < 2 else k
(a, b) = (f(a), f(b))
print('Alice' if a > b else 'Bob' if a < b else 'Draw')


(a, b) = map(int, input().split())
c = (a + 11) % 13
d = (b + 11) % 13
if c > d:
	print('Alice')
elif c < d:
	print('Bob')
else:
	print('Draw')


def resolve():
	(A, B) = map(int, input().split())
	if A == 1:
		A += 13
	if B == 1:
		B += 13
	if A > B:
		print('Alice')
	elif A < B:
		print('Bob')
	else:
		print('Draw')
resolve()


(a, b) = map(lambda x: 14 if int(x) == 1 else int(x), input().split())
if a > b:
	s = 'Alice'
elif a < b:
	s = 'Bob'
else:
	s = 'Draw'
print(s)


(a, b) = map(lambda x: int(x) + 13 * (x == '1'), input().split())
print('Alice') if a > b else print('Bob') if a < b else print('Draw')


def solve():
	(A, B) = map(int, input().split())
	if A == B:
		print('Draw')
	elif A == 1 or (B != 1 and B < A):
		print('Alice')
	else:
		print('Bob')

def __starting_point():
	solve()
__starting_point()


(alice, bob) = list(map(int, input().split()))
if alice == bob:
	print('Draw')
elif alice == 1 or (bob != 1 and alice > bob):
	print('Alice')
else:
	print('Bob')


(A, B) = [int('14' if x == '1' else x) for x in input().split()]
print('Alice' if A > B else 'Bob' if B > A else 'Draw')


(a, b) = map(lambda x: (int(x) + 11) % 13, input().split())
if a > b:
	print('Alice')
elif a == b:
	print('Draw')
else:
	print('Bob')


(A, B) = list(map(int, input().split()))
ans = ['Alice', 'Bob', 'Draw']
if A == 1:
	A = 14
if B == 1:
	B = 14
if A > B:
	print(ans[0])
elif A == B:
	print(ans[2])
else:
	print(ans[1])


n = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]
(a, b) = map(int, input().split())
(a, b) = (n.index(a), n.index(b))
print(['DBroabw'[a < b::2], 'Alice'][a > b])


print((['Alice'] * 13 + ['Draw'] + ['Bob'] * 13)[sum((x * y for (x, y) in zip([(14 - int(a)) % 13 for a in input().split()], (1, -1)))) + 13])


(A, B) = map(lambda x: int(x) if int(x) > 1 else 14, input().split())
if A > B:
	print('Alice')
if A == B:
	print('Draw')
if A < B:
	print('Bob')


def resolve():
	(A, B) = list(map(int, input().split()))
	if A == B:
		print('Draw')
	elif A == 1 or (A > B and B != 1):
		print('Alice')
	else:
		print('Bob')
resolve()


(a, b) = map(int, input().split())
a1 = a + 13 * (a == 1)
b1 = b + 13 * (b == 1)
print('Alice' if a1 > b1 else 'Bob' if b1 > a1 else 'Draw')


(a, b) = map(lambda x: (int(x) + 13) % 15, input().split())
print(['Draw', ['Bob', 'Alice'][a > b]][a != b])


(a, b) = list(map(int, input().split()))
li = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]
a1 = li.index(a)
b1 = li.index(b)
if a1 > b1:
	print('Alice')
elif a1 == b1:
	print('Draw')
else:
	print('Bob')


l = list(range(2, 14)) + [1]
(a, b) = list(map(int, input().split()))
(a, b) = (l.index(a), l.index(b))
print('Draw' if a == b else 'Alice' if a > b else 'Bob')


import sys, math
from functools import lru_cache
from itertools import accumulate
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

def input():
	return sys.stdin.readline()[:-1]

def mi():
	return map(int, input().split())

def ii():
	return int(input())

def i2(n):
	tmp = [list(mi()) for i in range(n)]
	return [list(i) for i in zip(*tmp)]
(A, B) = mi()
if A == B:
	print('Draw')
elif A == 1:
	print('Alice')
elif B == 1:
	print('Bob')
elif A > B:
	print('Alice')
else:
	print('Bob')


a = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
(b, c) = map(int, input().split())
print('Draw' if c == b else 'Alice' if a[b - 2] > a[c - 2] else 'Bob')


import sys
sys.setrecursionlimit(10 ** 8)
ini = lambda : int(sys.stdin.readline())
inl = lambda : [int(x) for x in sys.stdin.readline().split()]
ins = lambda : sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print('\x1b[33m', *a, '\x1b[0m', **dict(file=sys.stderr, **kw))

def solve():
	(a, b) = inl()
	a = (a + 11) % 13
	b = (b + 11) % 13
	if a == b:
		return 'Draw'
	elif a > b:
		return 'Alice'
	return 'Bob'
print(solve())


(a, b) = map(int, input().split())
print('ADlriacwe'[a == b::2]) if (b - 2) % 13 <= (a - 2) % 13 else print('Bob')


(M, N) = map(int, input().split())
if M == N:
	print('Draw')
elif M > N and N != 1 or M == 1:
	print('Alice')
else:
	print('Bob')


(a, b) = [(int(i) + 11) % 13 for i in input().split()]
if a > b:
	print('Alice')
elif a == b:
	print('Draw')
else:
	print('Bob')


(a, b) = map(int, input().split())
n = 13
(x, y) = ((n - ~-a) % n, (n - ~-b) % n)
print('Draw' if x == y else ['Alice', 'Bob'][x > y])


(x, y) = list(map(int, input().split()))
if x == 1:
	x = 14
if y == 1:
	y = 14
if x > y:
	print('Alice')
elif x < y:
	print('Bob')
else:
	print('Draw')


a = [i for i in range(2, 15)]
(b, c) = map(int, input().split())
print('Draw' if c == b else 'Alice' if a[b - 2] > a[c - 2] else 'Bob')


import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):

	def assertIO(self, input, output):
		(stdout, stdin) = (sys.stdout, sys.stdin)
		(sys.stdout, sys.stdin) = (StringIO(), StringIO(input))
		resolve()
		sys.stdout.seek(0)
		out = sys.stdout.read()[:-1]
		(sys.stdout, sys.stdin) = (stdout, stdin)
		self.assertEqual(out, output)

	def test_入力例_1(self):
		input = '8 6'
		output = 'Alice'
		self.assertIO(input, output)

	def test_入力例_2(self):
		input = '1 1'
		output = 'Draw'
		self.assertIO(input, output)

	def test_入力例_3(self):
		input = '13 1'
		output = 'Bob'
		self.assertIO(input, output)

def resolve():
	(A, B) = list(map(int, input().split()))
	if A == 1:
		A = 14
	if B == 1:
		B = 14
	if A > B:
		print('Alice')
	elif A < B:
		print('Bob')
	else:
		print('Draw')

def __starting_point():
	resolve()
__starting_point()


i = lambda x: 14 if x == 1 else x
(a, b) = [i(int(n)) for n in input().split()]
print('Alice' if a > b else 'Bob' if b > a else 'Draw')


p = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]
(a, b) = map(int, input().split())
print('ABloibc e'[p.index(a) < p.index(b)::2] if a != b else 'Draw')


import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10 ** 9)

def si():
	return input()

def ii():
	return int(input())

def fi():
	return float(input())

def lstr():
	return input().split()

def lint():
	return list(map(int, input().split()))

def lint_dec():
	return list(map(lambda x: int(x) - 1, input().split()))

def lnstr(n):
	return [input() for _ in range(n)]

def lnint(n):
	return [int(input()) for _ in range(n)]

def lint_list(n):
	return [lint() for _ in range(n)]
(A, B) = lint()
if A > 1:
	A -= 13
if B > 1:
	B -= 13
print('Alice' if A > B else 'Bob' if A < B else 'Draw')


l = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]
A = map(int, input().split())
(a, b) = map(l.index, A)
print('ADBlroiabcw e'[(a < b) + (a <= b)::3])


(A, B) = map(lambda x: (int(x) + 13) % 15, input().split())
if A > B:
	print('Alice')
elif A == B:
	print('Draw')
else:
	print('Bob')


(A, B) = map(int, input().split())
A = (A - 2) % 13
B = (B - 2) % 13
print(['Draw', 'Alice', 'Bob'][(A > B) - (B > A)])


(a, b) = map(int, input().split())
if a == 1:
	a += 100
if b == 1:
	b += 100
print('Alice' * (a > b) or 'Bob' * (b > a) or 'Draw')


(a, b) = map(int, input().split())
A = (a - 2) % 13
B = (b - 2) % 13
print('Alice' if A > B else 'Draw' if A == B else 'Bob')


a = list(map(int, input().split()))
print('Draw' if a[0] == a[1] else 'Alice' if a[0] > a[1] and a[1] != 1 or a[0] == 1 else 'Bob')