結果
問題 |
No.1716 Bonus Nim
|
ユーザー |
|
提出日時 | 2021-10-22 23:23:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 457 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 38,200 KB |
最終ジャッジ日時 | 2024-09-23 07:54:00 |
合計ジャッジ時間 | 6,826 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 4 WA * 22 |
ソースコード
def f(n,a): one = a.count(1) dif = sum(a)-n if one%2==0: if (n-one)%2==0: if dif%2==1: return 'Alice' else: return 'Bob' else: return 'Alice' else: if (n-one)%2==0: return 'Alice' else: return 'Bob' T = int(input()) for _ in range(T): N = int(input()) A = list(map(int,input().split())) print(f(N,A))