結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー 12354865271235486527
提出日時 2020-02-13 05:13:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-04-15 08:14:35
合計ジャッジ時間 4,962 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
10,624 KB
testcase_01 AC 34 ms
10,624 KB
testcase_02 AC 37 ms
10,624 KB
testcase_03 AC 40 ms
10,752 KB
testcase_04 AC 38 ms
10,624 KB
testcase_05 AC 38 ms
10,752 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 36 ms
10,624 KB
testcase_09 AC 34 ms
10,752 KB
testcase_10 AC 38 ms
10,752 KB
testcase_11 AC 40 ms
10,624 KB
testcase_12 AC 41 ms
10,624 KB
testcase_13 WA -
testcase_14 AC 69 ms
10,880 KB
testcase_15 AC 71 ms
10,752 KB
testcase_16 WA -
testcase_17 AC 70 ms
10,752 KB
testcase_18 WA -
testcase_19 AC 137 ms
10,880 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 390 ms
11,648 KB
testcase_24 AC 377 ms
11,520 KB
testcase_25 AC 393 ms
11,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = [0] * N
for _ in range(N-1):
    u, v = map(int, input().split())
    a[u] += 1
    a[v] += 1
if a.count(0) >= 2:
    print("Alice")
elif a.count(0) == 1 and a.count(1) >= 1:
    print("Alice")
else:
    print("Bob")
0