結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 12:58:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| コード長 | 305 bytes |
| コンパイル時間 | 418 ms |
| コンパイル使用メモリ | 82,668 KB |
| 実行使用メモリ | 101,632 KB |
| 最終ジャッジ日時 | 2025-06-12 13:05:31 |
| 合計ジャッジ時間 | 6,312 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
trailing_ones = 0
found = False
for num in reversed(a):
if num > 1:
found = True
break
trailing_ones += 1
if not found:
print("Alice" if n % 2 == 1 else "Bob")
else:
print("Alice" if trailing_ones % 2 == 0 else "Bob")
gew1fw