結果
| 問題 | No.3112 Decrement or Mod Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-12 12:43:45 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
WJ
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 558 bytes |
| 記録 | |
| 最終ジャッジ日時 | 2026-11-13 13:08:39 |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
ソースコード
def calc(a,b,t):
if a == 0:return 1
if b == 0:return 0
if t == 0:
if calc(a-1,b,t^1) == 1:
return 1
if a >= b and calc(a % b,b,t^1) == 1:
return 1
return 0
if t == 1:
if calc(a,b-1,t^1) == 0:
return 0
if b >= a and calc(a,b % a,t^1) == 0:
return 0
return 1
a,b = map(int,input().split())
print('Bob' if a != 1 and (a >= 3 and a-1 == b or a < b) else 'Alice')
exit()
for i in range(1,20):
for j in range(1,20):
print(i,j,calc(i,j,0))