One task about weighted tree