結果
| 問題 |
No.806 木を道に
|
| コンテスト | |
| ユーザー |
oshibori
|
| 提出日時 | 2019-03-22 21:47:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 187 bytes |
| コンパイル時間 | 197 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 78,632 KB |
| 最終ジャッジ日時 | 2024-09-19 04:04:07 |
| 合計ジャッジ時間 | 4,157 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 27 |
ソースコード
n=int(input())
n+=1
ans=0
deg=[0]*n
for i in range(n-2):
a,b=map(int,input().split())
deg[a]+=1
deg[b]+=1
for i in range(1,n+1):
ans+=max(0,deg[i]-2)
print(ans)
oshibori