func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1e6 + 5;   const int mod = 1e9 + 7;   int n, a, b;   double ans;   vector<vector<int>> g(N);   void dfs(int u, int par, int depth) {     ans += 1.0 / depth;     for (auto v : g[u])       if (v != par) dfs(v, u, depth + 1);   }   int main() {     cin >> n;     for (int i = 1; i < n; i++) {       cin >> a >> b;       g[a].push_back(b);       g[b].push_back(a);     }     dfs(1, 1, 1);     cout << fixed << setprecision(9) << ans;   }   