結果
問題 |
No.1506 Unbalanced Pocky Game
|
ユーザー |
![]() |
提出日時 | 2021-05-15 02:01:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 492 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 24,224 KB |
最終ジャッジ日時 | 2024-10-02 08:37:07 |
合計ジャッジ時間 | 6,148 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 WA * 35 |
ソースコード
import sys input = sys.stdin.readline N=int(input()) A=list(map(int,input().split())) LOSE=0 for a in A[:N-1]: if a==1: LOSE=1-LOSE else: LOSE=1 # print(LOSE) if LOSE==0: if N%2==0: if A[-1]==1: print("Alice") else: print("Bob") else: if A[-1]!=1: print("Alice") else: print("Bob") else: if N%2==0: print("Alice") else: print("Bob")