Logo
(追記) (追記ここまで)

15877번 - Apples and Bananas 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB42117114052.239%

문제

Alice and Bob are playing a game with some apples and bananas. The rules are as follows.

The game starts with Alice and Bob piling up a stack of fruits consisting of apples and bananas. Alice and Bob take turns removing apples and/or bananas from the pile, starting with Alice. Each turn, Alice or Bob may remove a) one apple, b) one banana, c) three apples and one banana, or d) one apple and three bananas. Fruits may only be removed in exact numbers; it is illegal to remove one apple and two bananas in a turn. The person to remove the last fruit from the pile wins the game. If there are no fruits to begin with, Bob immediately wins the game.

Assuming Alice and Bob both play optimally, determine if Alice or Bob wins the game with the given number of apples and bananas.

입력

The numbers of apples (a) and bananas (b), separated with a space. (0 ≤ a, b ≤ 1,000)

출력

The name of the person who wins the game with the given number of apples and bananas.

제한

예제 입력 1

1 0

예제 출력 1

Alice

예제 입력 2

2 2

예제 출력 2

Bob

예제 입력 3

3 4

예제 출력 3

Bob

힌트

출처

University > POSTECH > PPC 2018 D번

  • 문제를 만든 사람: zynyste
  • 데이터를 추가한 사람: YunGoon
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /