結果
問題 | No.2666 Decreasing Modulo Nim |
ユーザー |
|
提出日時 | 2024-03-09 00:10:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 453 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 82,340 KB |
実行使用メモリ | 106,268 KB |
最終ジャッジ日時 | 2024-09-29 21:00:32 |
合計ジャッジ時間 | 5,745 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 43 WA * 12 |
ソースコード
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")>0:print("Alice")else:print("Bob")elif len(b)==len(x):if x.count("1")>0:print("Alice")else:print("Bob")else:if x[-len(b):].count("1")>0:print("Alice")else:print("Bob")