func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 5;   const double esp = 1e-7;   const int mod = 1e9 + 7;   vector<int> adj[N];   int leaf = 0;   void dfs(int node = 1, int par = 0) {     int cnt = 0;     for (int child : adj[node]) {       if (child == par) continue;       dfs(child, node);       cnt++;     }     if (!cnt) {       leaf++;     }   }   int main() {     int n, s, u, v;     double ans;     scanf( %d %d , &n, &s);     for (int i = 1; i < n; i++) {       scanf( %d %d , &u, &v);       adj[u].push_back(v);       adj[v].push_back(u);     }     dfs();     if (adj[1].size() == 1) leaf++;     if (n == 2) {       leaf = 1;       ans = s;     } else {       ans = 2.0 * s / double(leaf);     }     printf( %.09f n , ans);     return 0;   }   