結果

問題 No.3112 Decrement or Mod Game
ユーザー Mistletoe
提出日時 2025-04-19 03:32:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 493 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2025-04-19 03:32:26
合計ジャッジ時間 4,010 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 43 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

def determine_winner(a, b):
    if a == 0 or b == 0:
        return True
    if a < b:
        a, b = b, a
    if a % b == 0:
        return True
    if a > 2 * b:
        return True
    return not determine_winner(b, a % b)

A, B = map(int, input().split())
if determine_winner(A, B):
    print("Alice")
else:
    print("Bob")
0