結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー tyawanmusityawanmusi
提出日時 2020-01-31 23:06:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 11,696 KB
実行使用メモリ 10,680 KB
最終ジャッジ日時 2023-10-17 12:02:54
合計ジャッジ時間 3,635 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,020 KB
testcase_01 AC 29 ms
10,020 KB
testcase_02 AC 28 ms
10,020 KB
testcase_03 AC 29 ms
10,020 KB
testcase_04 AC 28 ms
10,020 KB
testcase_05 AC 29 ms
10,020 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 29 ms
10,020 KB
testcase_09 WA -
testcase_10 AC 29 ms
10,020 KB
testcase_11 AC 30 ms
10,020 KB
testcase_12 AC 29 ms
10,020 KB
testcase_13 AC 56 ms
10,116 KB
testcase_14 AC 56 ms
10,116 KB
testcase_15 AC 57 ms
10,116 KB
testcase_16 AC 57 ms
10,116 KB
testcase_17 AC 57 ms
10,116 KB
testcase_18 AC 111 ms
10,152 KB
testcase_19 AC 112 ms
10,152 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 311 ms
10,680 KB
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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