結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-30 15:19:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 84 ms / 2,000 ms |
| コード長 | 293 bytes |
| コンパイル時間 | 267 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 101,396 KB |
| 最終ジャッジ日時 | 2024-07-17 19:18:11 |
| 合計ジャッジ時間 | 7,170 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
N=int(input())
A=list(map(int, input().split()))
cnt=0
for i in range(N)[::-1]:
if A[i]==1:
cnt+=1
else:
break
if cnt==N:
if cnt%2==0:
print("Bob")
else:
print("Alice")
else:
if cnt%2==0:
print("Alice")
else:
print("Bob")