結果
問題 |
No.1506 Unbalanced Pocky Game
|
ユーザー |
![]() |
提出日時 | 2025-06-12 15:40:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 75 ms / 2,000 ms |
コード長 | 335 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 82,516 KB |
実行使用メモリ | 102,468 KB |
最終ジャッジ日時 | 2025-06-12 15:40:39 |
合計ジャッジ時間 | 5,239 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 63 |
ソースコード
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")