func_code_string: #include <bits/stdc++.h>   using namespace std;   int mult(int a, int b) {     long long res = ((long long)a * b) % 1000000007;     return res;   }   int binaryPow(int n, int p) {     int acc = 1;     while (p) {       if (p & 1) acc = mult(acc, n);       n = mult(n, n);       p /= 2;     }     return acc;   }   int modularInv(int n) { return binaryPow(n, 1000000007 - 2); }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int k, pa, pb;     cin >> k >> pa >> pb;     int pd = modularInv(pa + pb);     int dp[k + 1][k + 1];     for (int i = k; i >= 1; i--) {       for (int j = k; j >= 0; j--) {         if (i + j < k) {           dp[i][j] = mult(               (mult(pa, dp[i + 1][j]) + mult(pb, dp[i][i + j])) % 1000000007, pd);         } else {           dp[i][j] = (i + j + mult(pa, modularInv(pb))) % 1000000007;         }       }     }     cout << dp[1][0] <<   n ;     return 0;   }   