結果

問題 No.3112 Decrement or Mod Game
ユーザー norioc
提出日時 2025-04-19 06:54:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 678 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 56,944 KB
最終ジャッジ日時 2025-04-19 06:54:26
合計ジャッジ時間 5,416 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 45 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import cache
import sys
sys.setrecursionlimit(10 ** 6)

@cache
def f(a, b):
    if a == 1: return True
    if a > b and a % b == 0: return True

    if not f(b, a-1):
        return True

    if a > b and not f(b, a % b):
        return True

    return False


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