結果
| 問題 |
No.3112 Decrement or Mod Game
|
| コンテスト | |
| ユーザー |
ciffelia
|
| 提出日時 | 2025-04-20 17:28:52 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 340 bytes |
| コンパイル時間 | 321 ms |
| コンパイル使用メモリ | 11,776 KB |
| 実行使用メモリ | 10,368 KB |
| 最終ジャッジ日時 | 2025-04-20 17:28:57 |
| 合計ジャッジ時間 | 4,768 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 WA * 27 |
ソースコード
def winner(a: int, b: int, turn=0) -> str:
if a < b:
return winner(b, a, turn ^ 1)
if b == 0:
return "Alice" if turn == 0 else "Bob"
k = a // b
if k % 2 == 1:
return "Alice" if turn == 0 else "Bob"
else:
return winner(a % b, b, turn)
A, B = map(int, input().split())
print(winner(A, B))
ciffelia