結果

問題 No.977 アリス仕掛けの摩天楼
コンテスト
ユーザー tyawanmusi
提出日時 2020-01-31 23:06:33
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 216 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 293 ms
コンパイル使用メモリ 21,412 KB
実行使用メモリ 16,632 KB
最終ジャッジ日時 2026-08-29 11:55:20
合計ジャッジ時間 5,797 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n=int(input())
x=[0]*n
for i in range(n-1):
  a,b=map(int,input().split())
  x[a]+=1
  x[b]+=1
if x.count(1)==2 and x.count(2)==n-2:print("Bob")
elif x.count(0)==1 and x.count(2)==n-1:print("Bob")
else:print("Alice")
0