結果
問題 |
No.2666 Decreasing Modulo Nim
|
ユーザー |
|
提出日時 | 2024-03-08 23:22:50 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 355 bytes |
コンパイル時間 | 880 ms |
コンパイル使用メモリ | 82,316 KB |
実行使用メモリ | 105,884 KB |
最終ジャッジ日時 | 2024-09-29 20:42:33 |
合計ジャッジ時間 | 6,936 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 2 RE * 39 |
ソースコード
import sys input = sys.stdin.readline N, M = map(int, input().split()) A = list(map(int, input().split())) X = 0 for a in A: X ^= a b = 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[-b:].count("1")%2==0: print("Bob") else: print("Alice")