結果
問題 |
No.3112 Decrement or Mod Game
|
ユーザー |
|
提出日時 | 2025-04-20 12:54:59 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 552 bytes |
コンパイル時間 | 464 ms |
コンパイル使用メモリ | 12,160 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2025-04-20 12:55:05 |
合計ジャッジ時間 | 4,856 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 65 |
ソースコード
def alice_wins(a: int, b: int) -> bool: while True: if a == 1: res = True break if a < b: a, b = b, a - 1 flip = not flip continue if a % b == 0: res = True break if a >= 2 * b: res = True break res = False if a == b + 1 else True break return (not res) if flip else res if __name__ == "__main__": A, B = map(int, input().split()) print("Alice" if alice_wins(A, B) else "Bob")