목차

Programmers and Stones

ps
링크acmicpc.net/…
출처BOJ
문제 번호32908
문제명Programmers and Stones
레벨골드 3
분류

게임 이론

시간복잡도O(n)
인풋사이즈n<=100000
사용한 언어Python 3.13
제출기록44748KB / 64ms
최고기록64ms
해결날짜2025/01/17

풀이

코드

"""Solution code for "BOJ 32908. Programmers and Stones".

- Problem link: https://www.acmicpc.net/problem/32908
- Solution link: http://www.teferi.net/ps/problems/boj/32908

Tags: [game theory]
"""


def main():
    n = int(input())  # pylint: disable=unused-variable
    a = [int(x) for x in input().split()]
    print('Dmitry' if all(x % 2 == 0 for x in a) else 'Alice')


if __name__ == '__main__':
    main()