func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1005;   template <typename T>   void read(T &x) {     x = 0;     int f = 1;     char c = getchar();     for (; !isdigit(c); c = getchar())       if (c ==  - ) f = -1;     for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + c -  0 ;     x *= f;   }   int n;   double g[N][N];   double E[N], prod[N];   bool vis[N];   int main() {     read(n);     for (int i = 1; i <= n; i++)       for (int j = 1; j <= n; j++) {         int x;         read(x);         g[i][j] = 1. * x / 100;       }     if (n == 1) return puts( 0 );     vis[n] = true;     for (int i = 1; i < n; i++) {       E[i] = 1;       prod[i] = 1 - g[i][n];     }     for (int i = 1; i <= n; i++) {       double low = 1e18;       int pos = 0;       for (int j = 1; j <= n; j++)         if (!vis[j] && E[j] / (1 - prod[j]) < low)           low = E[j] / (1 - prod[j]), pos = j;       if (pos == 1) return printf( %.10lf n , E[1] / (1 - prod[1])), 0;       vis[pos] = true;       for (int j = 1; j <= n; j++)         E[j] += E[pos] / (1 - prod[pos]) * g[j][pos] * prod[j],             prod[j] *= (1 - g[j][pos]);     }     return 0;   }   