結果
問題 | No.2666 Decreasing Modulo Nim |
ユーザー |
|
提出日時 | 2024-03-08 23:28:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 81,872 KB |
実行使用メモリ | 106,036 KB |
最終ジャッジ日時 | 2024-09-29 20:46:35 |
合計ジャッジ時間 | 6,312 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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-1)[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")