結果
| 問題 | No.806 木を道に |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-04-06 08:21:41 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 74 ms / 2,000 ms |
| + 489µs | |
| コード長 | 144 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 82,348 KB |
| 実行使用メモリ | 85,344 KB |
| 最終ジャッジ日時 | 2026-10-10 07:16:19 |
| 合計ジャッジ時間 | 3,740 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
ソースコード
n = int(input())
deg = [0]*n
for _ in range(n-1):
a,b = map(int,input().split())
deg[a-1] += 1
deg[b-1] += 1
print(deg.count(1) - 2)
convexineq