func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2010;   int n, a[N], m;   double f[N][N], p, ans;   inline int read() {     int x = 0;     char ch = getchar();     while (!isdigit(ch)) ch = getchar();     while (isdigit(ch)) x = (x << 3) + (x << 1) + ch - 48, ch = getchar();     return x;   }   int main() {     scanf( %d%lf%d , &n, &p, &m);     f[0][0] = 1;     for (int i = 1; i <= m; i++) {       f[i][0] = (1 - p) * f[i - 1][0];       for (int j = 1; j <= n - 1; j++)         f[i][j] = f[i - 1][j] * (1 - p) + f[i - 1][j - 1] * p;       f[i][n] = f[i - 1][n] + f[i - 1][n - 1] * p;     }     for (int i = 1; i <= n; i++) ans += f[m][i] * i;     printf( %lf , ans);     return 0;   }   