Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# 解答
def abc173_a(lines):
    N = int(lines[0])
    values = map(int, lines[1].split(' '))
    answer = 0
    tmp = list()
    for value in values:
        tmp.append(value)
    print(f'tmp=[{tmp}]')
    print(f'tmp[0]=[{tmp[0]}]')
    for i in range(N):
        if i % 2 != 0:
            pass
        else:
            if tmp[i] % 2 != 0:
                answer += 1
    return [answer]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5', '1 3 4 5 7']
        lines_export = [2]
    elif pattern == 2:
        lines_input = ['15', '13 76 46 15 50 98 93 77 31 43 84 90 6 24 14']
        lines_export = [3]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = abc173_a(lines_input)

    for line_result in lines_result:
        print(line_result)

    if mode > 0:
        print(f'lines_input=[{lines_input}]')
        print(f'lines_export=[{lines_export}]')
        print(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            print('OK')
        else:
            print('NG')


# 起動処理
if __name__ == '__main__':
    main()


Fixed submission:
# 解答
def abc173_a(lines):
    N = int(lines[0])
    values = map(int, lines[1].split(' '))
    answer = 0
    tmp = list()
    for value in values:
        tmp.append(value)
    for i in range(N):
        if i % 2 != 0:
            pass
        else:
            if tmp[i] % 2 != 0:
                answer += 1
    return [answer]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5', '1 3 4 5 7']
        lines_export = [2]
    elif pattern == 2:
        lines_input = ['15', '13 76 46 15 50 98 93 77 31 43 84 90 6 24 14']
        lines_export = [3]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = abc173_a(lines_input)

    for line_result in lines_result:
        print(line_result)

    if mode > 0:
        print(f'lines_input=[{lines_input}]')
        print(f'lines_export=[{lines_export}]')
        print(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            print('OK')
        else:
            print('NG')


# 起動処理
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

li = []
for i in range(N):
    li.append(A[i] + i)

li.sort()

cnt = 0
for j in range(N):
    cnt += li.count(j - A[j])

print(cnt)


Fixed submission:
from bisect import bisect_left, bisect_right

N = int(input())
A = list(map(int, input().split()))

li = []
for i in range(N):
    li.append(A[i] + i)

li.sort()

cnt = 0
for j in range(N):
    target = j - A[j]
    cnt += bisect_right(li, target) - bisect_left(li, target)

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import OrderedDict


if __name__ == "__main__":
    N, X, Y = map(int, input().split())
    k_dict = OrderedDict()

    for i in range(1, N):
        k_dict[i] = 0

    for i in range(1, N):
        for j in range(i+1, N+1):
            if i <= X and j <= X:
                d = j - i
                k_dict[d] += 1
                # print('{} {} {} debug 1'.format(i, j, d))
                continue

            if i <= X and X < j and j < Y:
                d = min(j-i, X-i + 1 + Y-j)
                k_dict[d] += 1
                # print('{} {} {} debug 2'.format(i, j, d))
                continue

            if i <= X and Y <= j:
                d = X-i + 1 + j-Y
                k_dict[d] += 1
                # print('{} {} {} debug 3'.format(i, j, d))
                continue

            if X < i and i < Y and X < j and j < Y:
                d = min(j-i, i-X + 1 + Y-j)
                k_dict[d] += 1
                # print('{} {} {} debug 4'.format(i, j, d))
                continue

            if X < i and i < Y and Y <= j:
                d = min(j-i, i-X + 1 + j - Y)
                k_dict[d] += 1
                # print('{} {} {} debug 5'.format(i, j, d))
                continue

            if Y <= i and Y <= j:
                d = j-i
                k_dict[d] += 1
                # print('{} {} {} debug 6'.format(i, j, d))
                continue

    for k, v in k_dict.items():
        # print('{} {}'.format(k, v))
        print(v)


Fixed submission:
from collections import OrderedDict


if __name__ == "__main__":
    N, X, Y = map(int, input().split())
    k_dict = OrderedDict()

    for i in range(1, N):
        k_dict[i] = 0

    for i in range(1, N):
        for j in range(i+1, N+1):
            if i <= X and j <= X:
                d = j - i
                k_dict[d] += 1
                # print('{} {} {} debug 1'.format(i, j, d))
                continue

            if i <= X and X < j and j < Y:
                d = min(j-i, X-i + 1 + Y-j)
                k_dict[d] += 1
                # print('{} {} {} debug 2'.format(i, j, d))
                continue

            if i <= X and Y <= j:
                d = X-i + 1 + j-Y
                k_dict[d] += 1
                # print('{} {} {} debug 3'.format(i, j, d))
                continue

            if X < i and i < Y and X < j and j < Y:
                d = min(j-i, i-X + 1 + Y-j)
                k_dict[d] += 1
                # print('{} {} {} debug 4'.format(i, j, d))
                continue

            if X < i and i < Y and Y <= j:
                d = min(j-i, i-X + 1 + j - Y)
                k_dict[d] += 1
                # print('{} {} {} debug 5'.format(i, j, d))
                continue

            if Y <= i and Y <= j:
                d = j-i
                k_dict[d] += 1
                # print('{} {} {} debug 6'.format(i, j, d))
                continue

    for k, v in k_dict.items():
        # print('{} {}'.format(k, v))
        print(v)
Buggy python submission (verdict: Time Limit Exceeded):
def solve(d, except_num):
    result = 0
    for k, v in d.items():
        if(k == except_num):
            result += (v-1) * (v-2) / 2
        else:
            result += v * (v-1) / 2
    return int(result)


N = int(input())
A = list(map(int, input().split()))

d = {}

for a in A:
    if a not in d:
        d[a] = 1
    else:
        d[a] += 1

# print(d)

for i, a in enumerate(A):
    print(solve(d, a))


Fixed submission:
def sum_solve(d):
    result = 0
    for k, v in d.items():
        result += v * (v-1) / 2
    return int(result)


def solve(sum_d, d, except_num):
    num = d[except_num]
    result = sum_d - num * (num-1)/2 + (num-1) * (num-2) / 2
    return int(result)


N = int(input())
A = list(map(int, input().split()))

d = {}

for a in A:
    if a not in d:
        d[a] = 1
    else:
        d[a] += 1

sum_d = sum_solve(d)
# print(sum_d)

for i, a in enumerate(A):
    print(solve(sum_d, d, a))
Buggy python submission (verdict: Time Limit Exceeded):
# https://atcoder.jp/contests/abc145/tasks/abc145_d
import math
X, Y = list(map(int, input().split()))

if (X + Y) % 3 != 0:
    print(0)
    exit()


n = int((2*X - Y) // 3)
m = int((2*Y - X) // 3)

if n < 0 or m < 0:
    print(0)
    exit()

MOD = 10 ** 9 + 7
result = math.factorial(n + m) * pow(math.factorial(n), -1,
                                     MOD) * pow(math.factorial(m), -1, MOD) % MOD
print(result)


Fixed submission:
# https://atcoder.jp/contests/abc145/tasks/abc145_d
import math
X, Y = list(map(int, input().split()))

if (X + Y) % 3 != 0:
    print(0)
    exit()


n = int((2*X - Y) // 3)
m = int((2*Y - X) // 3)

if n < 0 or m < 0:
    print(0)
    exit()


def comb(n, k):
    c = 1
    for i in range(k):
        c *= n - i
        c %= MOD
    d = 1
    for i in range(1, k + 1):
        d *= i
        d %= MOD
    return (c * pow(d, MOD - 2, MOD)) % MOD

MOD = 10 ** 9 + 7
result = comb(n+m, n)
print(result)
Buggy python submission (verdict: Runtime Error):
import sys
from io import StringIO
import unittest
import math


def check(A, F, x, N, K):
    for i in range(N):
        if A[i] * F[i] > x:
            k = math.ceil(A[i] - x / F[i])
            K -= k
    if K < 0:
        return False
    else:
        return True


def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    F = list(map(int, input().split()))
    A.sort(reverse=True)
    F.sort()

    # binary search
    l = 0
    r = max(A) * max(F)
    result = None
    while l <= r:
        # print('l {}, r {}'.format(l, r))
        if l == r:
            result = l
            break
        mid = (l + r) // 2
        if check(A, F, mid, N, K):
            r = mid
        else:
            l = mid + 1

    print(result)


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 = """3 5
4 2 1
2 3 1"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 8
4 2 1
2 3 1"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """11 14
3 1 4 1 5 9 2 6 5 3 5
8 9 7 9 3 2 3 8 4 6 2"""
        output = """12"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()


Fixed submission:
import sys
from io import StringIO
import unittest
import math


def resolve():
    N = int(input())
    A = 1
    B = 1

    center = math.ceil(math.sqrt(N))
    for i in range(1, center + 1)[::-1]:
        if N % i == 0:
            A = i
            B = int(N / i)
            break
        else:
            continue

    result = A - 1 + B - 1
    print(result)


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 = """10"""
        output = """5"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """50"""
        output = """13"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """10000000019"""
        output = """10000000018"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from io import StringIO
import unittest
import math


def check(A, F, x, N, K):
    for i in range(N):
        if A[i] * F[i] > x:
            k = math.ceil(A[i] - x / F[i])
            K -= k
    if K < 0:
        return False
    else:
        return True


def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    F = list(map(int, input().split()))
    A.sort(reverse=True)
    F.sort()

    # binary search
    l = 0
    r = max(A) * max(F)
    result = None
    while l <= r:
        # print('l {}, r {}'.format(l, r))
        if l == r:
            result = l
            break
        mid = (l + r) // 2
        if check(A, F, mid, N, K):
            r = mid
        else:
            l = mid + 1

    print(result)


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 = """3 5
4 2 1
2 3 1"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 8
4 2 1
2 3 1"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """11 14
3 1 4 1 5 9 2 6 5 3 5
8 9 7 9 3 2 3 8 4 6 2"""
        output = """12"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()


Fixed submission:
import math


def check(A, F, x, N, K):
    for i in range(N):
        if A[i] * F[i] > x:
            k = math.ceil(A[i] - x / F[i])
            K -= k
    if K < 0:
        return False
    else:
        return True


def resolve():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    F = list(map(int, input().split()))
    A.sort(reverse=True)
    F.sort()

    # binary search
    l = 0
    r = max(A) * max(F)
    result = None
    while l <= r:
        # print('l {}, r {}'.format(l, r))
        if l == r:
            result = l
            break
        mid = (l + r) // 2
        if check(A, F, mid, N, K):
            r = mid
        else:
            l = mid + 1

    print(result)


if __name__ == "__main__":
    resolve()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
result = []
for i in range(1, N+1):
    result.append(A.index(i) + 1)

print(' '.join(map(str, result)))


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
result = [0] * (N + 1)
for i in range(1, N+1):
    result[A[i - 1]] = i

print(' '.join(map(str, result[1::])))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from io import StringIO
import unittest


def resolve():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))

    for i in range(M):
        m = max(A)
        m_index = A.index(m)
        A[m_index] //= 2

    print(int(sum(A)))


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 = """3 3
2 13 8"""
        output = """9"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """4 4
1 9 3 5"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """1 100000
1000000000"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """10 1
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000"""
        output = """9500000000"""
        self.assertIO(input, output)


if __name__ == "__main__":
    resolve()


Fixed submission:
import sys
from io import StringIO
import unittest
import heapq


def resolve():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    A = list(map(lambda x: x*(-1), A))
    heapq.heapify(A)

    for i in range(M):
        m = -1 * heapq.heappop(A)
        heapq.heappush(A, -1 * (m//2))

    print(-1 * int(sum(A)))


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 = """3 3
2 13 8"""
        output = """9"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """4 4
1 9 3 5"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """1 100000
1000000000"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """10 1
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000"""
        output = """9500000000"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()
Buggy python submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc065/tasks/arc076_b
import copy


class UnionFind():
    def __init__(self, n):
        super().__init__()
        self.n = n
        self.parents = [i for i in range(n)]

    def root(self, x):
        if self.parents[x] == x:
            return x
        else:
            self.parents[x] = self.root(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return False
        self.parents[y] = x
        return True


n = int(input())
rows = [[i] + list(map(int, input().split())) for i in range(n)]

# (start, end, cost)
edges = []

# x座標でソートしてx座標が隣り合う点にをedge候補に
rows_x = copy.deepcopy(rows)
rows_x.sort(key=lambda x: x[1])
for i in range(len(rows)-1):
    left = rows_x[i]
    right = rows_x[i+1]
    edges.append((left[0], right[0], right[1] - left[1]))

rows_y = copy.deepcopy(rows)
rows_y.sort(key=lambda x: x[2])
for i in range(len(rows)-1):
    down = rows_y[i]
    up = rows_y[i+1]
    edges.append((down[0], up[0], up[2] - down[2]))

# print(edges)

uf = UnionFind(n)

edges.sort(key=lambda edge: edge[2])

result = 0
for edge in edges:
    s, t, c = edge
    unioned = uf.union(s, t)
    if unioned:
        result += c

print(result)


Fixed submission:
# https://atcoder.jp/contests/abc065/tasks/arc076_b
import copy


class UnionFind():
    def __init__(self, n):
        super().__init__()
        self.n = n
        self.parents = [-1] * n

    def root(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.root(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return False
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
        return True


n = int(input())
rows = [[i] + list(map(int, input().split())) for i in range(n)]

# (start, end, cost)
edges = []

# x座標でソートしてx座標が隣り合う点にをedge候補に
rows_x = copy.deepcopy(rows)
rows_x.sort(key=lambda x: x[1])
for i in range(len(rows)-1):
    left = rows_x[i]
    right = rows_x[i+1]
    edges.append((left[0], right[0], right[1] - left[1]))

# print(rows)
rows_y = copy.deepcopy(rows)
rows_y.sort(key=lambda x: x[2])
for i in range(len(rows)-1):
    down = rows_y[i]
    up = rows_y[i+1]
    edges.append((down[0], up[0], up[2] - down[2]))

# print(edges)

uf = UnionFind(n)

edges.sort(key=lambda edge: edge[2])

result = 0
for edge in edges:
    s, t, c = edge
    unioned = uf.union(s, t)
    if unioned:
        result += c

print(result)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
count = 0
while(1):
    if N>=1:
        if M>=2:
            N -= 1
            M -= 2
            count += 1
        else:
            break
    else:
        while(1):
            if M >= 4 :
                M -= 4
                count += 1
            else:
                break
        break
        
print(count)


Fixed submission:
N = int(input())
x = 0
y = 0
for i in range(1,N+1):
    x += 800
    if (i%15 == 0):
        y += 200
print(x-y)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
count = 0
while(1):
    if N>=1:
        if M>=2:
            N -= 1
            M -= 2
            count += 1
        else:
            break
    elif M >= 4 :
        M -= 4
        count += 1
    else:
        break
        
print(count)


Fixed submission:
N = int(input())
x = 0
y = 0
for i in range(1,N+1):
    x += 800
    if (i%15 == 0):
        y += 200
print(x-y)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
num_c = N*2 + M
num_Scc = num_c//4
print(num_Scc)


Fixed submission:
N = int(input())
x = 0
y = 0
for i in range(1,N+1):
    x += 800
    if (i%15 == 0):
        y += 200
print(x-y)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b,c=map(int,input().split())
s=input()
print(str(a+b+c) + " " + s)

Fixed submission:
N = int(input())
x = 0
y = 0
for i in range(1,N+1):
    x += 800
    if (i%15 == 0):
        y += 200
print(x-y)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p = 1
for i in range(1,N+1):
    p *= i 

print(p % (10**9 +7))


Fixed submission:
N = int(input())
p = 1
big_num = 10**9+7
for i in range(1,N+1):
    p *= i 
    p %= big_num

print(p)
Buggy python submission (verdict: Runtime Error):
import math
N,M = map(int,input().split())
count = 0
if N*2>M:
    count = math.floor(M/2)
else:
    temp=M-2*N
    ans = N+math.floor(temp/4)

print(ans)

Fixed submission:
import math
N,M = map(int,input().split())
count = 0
if N*2>M:
    count = math.floor(M/2)
else:
    temp=M-2*N
    count = N+math.floor(temp/4)

print(count)

Buggy python submission (verdict: Runtime Error):
import math
N,M = map(int,input().split())
count = 0
if N*2>M:
    count = math.floor(M/2)
else:
    temp=M-2*N
    ans = N+math.floor(temp/4)

print(ans)
    


Fixed submission:
import math
N,M = map(int,input().split())
count = 0
if N*2>M:
    count = math.floor(M/2)
else:
    temp=M-2*N
    count = N+math.floor(temp/4)

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
count = 0
while(1):
    if N>=1:
        if M>=2:
            N -= 1
            M -= 2
            count += 1
        else:
            break
    else:
        while(1):
            if M >= 4 :
                M -= 4
                count += 1
            else:
                break
        break
        
print(count)


Fixed submission:
import math
N,M = map(int,input().split())
count = 0
if N*2>M:
    count = math.floor(M/2)
else:
    temp=M-2*N
    count = N+math.floor(temp/4)

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
count = 0
while(1):
    if N>=1:
        if M>=2:
            N -= 1
            M -= 2
            count += 1
        else:
            break
    elif M >= 4 :
        M -= 4
        count += 1
    else:
        break
        
print(count)


Fixed submission:
import math
N,M = map(int,input().split())
count = 0
if N*2>M:
    count = math.floor(M/2)
else:
    temp=M-2*N
    count = N+math.floor(temp/4)

print(count)
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
a=[input() for i in range(N)]
b=[input() for i in range(M)]

ans = 0
for i in range(N-M+1):
    for j in range(N-M+1):
        t = [k[j:j+M] for k in a[i:i+M]]
        if t==b: ans =1

print("Yes" if ans else "No")


Fixed submission:
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')