結果
問題 | No.2103 ±1s Game |
ユーザー | flygon |
提出日時 | 2022-10-22 14:50:12 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 1,000 ms |
コード長 | 578 bytes |
コンパイル時間 | 542 ms |
コンパイル使用メモリ | 82,120 KB |
実行使用メモリ | 54,092 KB |
最終ジャッジ日時 | 2024-07-01 16:34:18 |
合計ジャッジ時間 | 3,050 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
x,y,k,p = map(int,input().split()) left = x+y-k if left & 1: if x <= left//2: yy = y - (left-x) tmp = pow(-1, yy) if tmp == p: print("Alice") else: print("Bob") elif y <= left//2: tmp = 1 if tmp == p: print("Alice") else: print("Bob") else: print("Alice") else: if x <= left//2: yy = y - (left-x) tmp = pow(-1, yy) if tmp == p: print("Alice") else: print("Bob") elif y <= left//2: tmp = 1 if tmp == p: print("Alice") else: print("Bob") else: print("Bob")