結果

問題 No.2666 Decreasing Modulo Nim
ユーザー PNJPNJ
提出日時 2024-03-08 22:32:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 108,596 KB
最終ジャッジ日時 2024-03-08 22:33:14
合計ジャッジ時間 6,587 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 35 ms
53,460 KB
testcase_03 AC 51 ms
66,924 KB
testcase_04 AC 115 ms
105,576 KB
testcase_05 AC 122 ms
101,560 KB
testcase_06 AC 46 ms
64,556 KB
testcase_07 AC 84 ms
96,760 KB
testcase_08 AC 59 ms
74,396 KB
testcase_09 AC 98 ms
106,772 KB
testcase_10 AC 78 ms
96,584 KB
testcase_11 AC 56 ms
73,144 KB
testcase_12 AC 46 ms
67,876 KB
testcase_13 AC 57 ms
79,856 KB
testcase_14 AC 49 ms
69,520 KB
testcase_15 AC 77 ms
99,112 KB
testcase_16 AC 47 ms
68,568 KB
testcase_17 AC 57 ms
80,028 KB
testcase_18 AC 67 ms
90,624 KB
testcase_19 AC 63 ms
83,616 KB
testcase_20 AC 60 ms
81,708 KB
testcase_21 AC 93 ms
105,528 KB
testcase_22 AC 51 ms
70,436 KB
testcase_23 AC 50 ms
68,276 KB
testcase_24 AC 55 ms
72,016 KB
testcase_25 AC 54 ms
74,420 KB
testcase_26 AC 73 ms
96,744 KB
testcase_27 AC 65 ms
86,976 KB
testcase_28 AC 88 ms
105,496 KB
testcase_29 AC 75 ms
96,856 KB
testcase_30 AC 88 ms
108,596 KB
testcase_31 AC 64 ms
88,028 KB
testcase_32 AC 73 ms
98,404 KB
testcase_33 AC 99 ms
101,412 KB
testcase_34 AC 46 ms
66,052 KB
testcase_35 AC 85 ms
103,524 KB
testcase_36 AC 67 ms
90,696 KB
testcase_37 AC 80 ms
103,004 KB
testcase_38 AC 88 ms
107,224 KB
testcase_39 AC 45 ms
66,440 KB
testcase_40 AC 75 ms
96,872 KB
testcase_41 AC 64 ms
88,260 KB
testcase_42 AC 64 ms
88,316 KB
testcase_43 AC 35 ms
53,460 KB
testcase_44 AC 36 ms
53,460 KB
testcase_45 AC 125 ms
101,736 KB
testcase_46 AC 114 ms
101,816 KB
testcase_47 AC 94 ms
101,744 KB
testcase_48 AC 94 ms
101,732 KB
testcase_49 AC 100 ms
101,740 KB
testcase_50 AC 98 ms
101,812 KB
testcase_51 AC 94 ms
101,744 KB
testcase_52 AC 95 ms
101,732 KB
testcase_53 AC 125 ms
102,000 KB
testcase_54 AC 97 ms
102,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
A = list(map(int,input().split()))
B = [A[i]//m for i in range(n)]
g = 0
for b in B:
  g ^= b
if g > 0:
  print('Alice')
  exit()


R = [A[i] % m for i in range(n)]
while True:
  if sum(R) == 0:
    print('Bob')
    exit()
  if sum(R) % 2 == 1:
    print('Alice')
    exit()
  for i in range(n):
    R[i] //= 2
0