結果

問題 No.1506 Unbalanced Pocky Game
ユーザー googol_S0
提出日時 2021-05-14 22:25:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 101,376 KB
最終ジャッジ日時 2024-10-02 02:02:59
合計ジャッジ時間 5,536 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 28 WA * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
if N==1 or A[-1]>1:
  print('Alice')
else:
  c=1
  for i in range(N-2,-1,-1):
    if A[i]==1:
      c+=1
    else:
      break
  if c&1:
    print('Alice')
  else:
    print('Bob')
0