結果

問題 No.1506 Unbalanced Pocky Game
ユーザー gew1fw
提出日時 2025-06-12 20:47:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 81,772 KB
実行使用メモリ 102,208 KB
最終ジャッジ日時 2025-06-12 20:50:01
合計ジャッジ時間 5,907 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 63
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))

found = False
p = 0
for i in range(n-1, -1, -1):
    if a[i] > 1:
        p = n - i
        found = True
        break

if found:
    if p % 2 == 1:
        print("Alice")
    else:
        print("Bob")
else:
    if n % 2 == 1:
        print("Alice")
    else:
        print("Bob")
0