func_code_string: #include <bits/stdc++.h>   using namespace std;   #pragma GCC optimize( Ofast )   #pragma GCC optimize( unroll-loops )   template <class T, class U>   istream &operator>>(istream &in, pair<T, U> &p) {     in >> p.first >> p.second;     return in;   }   template <class T, class U>   ostream &operator<<(ostream &out, const pair<T, U> &p) {     out << p.first <<     << p.second;     return out;   }   template <class T>   istream &operator>>(istream &in, vector<T> &v) {     for (auto &i : v) {       in >> i;     }     return in;   }   template <class T>   ostream &operator<<(ostream &out, const vector<T> &v) {     for (auto &i : v) {       out << i <<    ;     }     return out;   }   inline void io(int x = 15) {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     srand(time(0));     cout << fixed << setprecision(x);   }   vector<int> prefix_function(string s) {     int n = s.length();     vector<int> pi(n);     for (int i = 1; i < n; ++i) {       int j = pi[i - 1];       while (j > 0 && s[i] != s[j]) {         j = pi[j - 1];       }       if (s[i] == s[j]) ++j;       pi[i] = j;     }     return pi;   }   bool prime_test(long long n) {     for (long long i = 2; i * i <= n; ++i)       if ((n >= 0 && n < 2) || n % i == 0) return false;     return true;   }   void prime_nums(int n, vector<char> &prime) {     prime[0] = prime[1] = false;     for (long long i = 2; i * i <= n; ++i) {       if (prime[i]) {         for (int j = i * i; j <= n; j += i) {           prime[j] = false;         }       }     }   }   long long bin_pow(long long a, long long b, long long m = 0) {     if (m == 0)       return b == 0 ? 1 : (b % 2 ? bin_pow(a, b - 1) * a : bin_pow(a * a, b / 2));     if (b == 0) return 1;     long long temp = bin_pow(a, b / 2, m);     if (b % 2 == 0)       return (temp * temp) % m;     else       return (a * temp * temp) % m;   }   bool nextperm(vector<char> &a) {     int n = a.size();     for (int i = n - 2; i >= 0; --i) {       if (a[i] < a[i + 1]) {         int mnv = a[i + 1], mni = i + 1;         for (int j = i + 2; j < n; ++j) {           if (a[j] < mnv && a[j] > a[i]) {             mni = j;             mnv = a[j];           }         }         swap(a[i], a[mni]);         reverse(a.begin() + i + 1, a.end());         return true;       }     }     return false;   }   int main() {     io();     int n, s;     cin >> n >> s;     vector<int> used(n);     for (int i = 0; i < n - 1; ++i) {       int l, r;       cin >> l >> r;       ++used[--l];       ++used[--r];     }     int x = 0;     for (int i = 0; i < n; ++i) {       if (used[i] == 1) {         ++x;       }     }     cout << (long double)s / x * 2;     return 0;   }   