結果

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

ソースコード

diff #

def alice_wins(a: int, b: int) -> bool:

    while True:
        if a == 1:
            return True
        if a < b:
            a, b = b, a - 1
            continue
        if a % b == 0:
            return True
        if a >= 2 * b:
            return True
        return False if a == b + 1 else True

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