結果

問題 No.1716 Bonus Nim
コンテスト
ユーザー ああいい
提出日時 2022-03-16 20:29:44
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 266 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 263 ms
コンパイル使用メモリ 95,824 KB
実行使用メモリ 142,400 KB
最終ジャッジ日時 2026-09-03 14:03:03
合計ジャッジ時間 8,559 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

T = int(input())

for _ in range(T):
    N = int(input())
    a = list(map(int,input().split()))
    if N % 2 == 1:
        print('Alice')
        continue
    S = 0
    for i in a:
        S ^= i
    if S == 0:
        print('Bob')
    else:
        print("Alice")
0