結果
問題 | No.2666 Decreasing Modulo Nim |
ユーザー |
|
提出日時 | 2024-03-08 23:26:46 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 360 bytes |
コンパイル時間 | 279 ms |
コンパイル使用メモリ | 82,220 KB |
実行使用メモリ | 106,052 KB |
最終ジャッジ日時 | 2024-09-29 20:44:31 |
合計ジャッジ時間 | 5,765 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 WA * 24 |
ソースコード
import sysinput = sys.stdin.readlineN, M = map(int, input().split())A = list(map(int, input().split()))X = 0for a in A:X ^= ab = bin(M)[2:]x = bin(X)[2:]if len(b)>=len(x):if x.count("1")%2==0:print("Bob")else:print("Alice")else:if x[-len(b):].count("1")%2==0:print("Bob")else:print("Alice")