description: A sequence of integers b_1, b_2, …, b_m is called good if max(b_1, b_2, …, b_m) ⋅ min(b_1, b_2, …, b_m) ≥ b_1 + b_2 + … + b_m.
  
  A sequence of integers a_1, a_2, …, a_n is called perfect if every non-empty subsequence of a is good.
  
  YouKn0wWho has two integers n and M, M is prime. Help him find the number, modulo M, of perfect sequences a_1, a_2, …, a_n such that 1 ≤ a_i ≤ n + 1 for each integer i from 1 to n.
  
  A sequence d is a subsequence of a sequence c if d can be obtained from c by deletion of several (possibly, zero or all) elements.
  
  Input
  
  The first and only line of the input contains two space-separated integers n and M (1 ≤ n ≤ 200; 10^8 ≤ M ≤ 10^9). It is guaranteed that M is prime.
  
  Output
  
  Print a single integer — the number of perfect sequences modulo M.
  
  Examples
  
  Input
  
  
  2 998244353
  
  
  Output
  
  
  4
  
  
  Input
  
  
  4 100000007
  
  
  Output
  
  
  32
  
  
  Input
  
  
  69 999999937
  
  
  Output
  
  
  456886663
  
  Note
  
  In the first test case, the perfect sequences are [2, 2], [2, 3], [3, 2] and [3, 3].
  
  In the second test case, some of the perfect sequences are [3, 4, 3, 5], [4, 5, 4, 4], [4, 5, 5, 5] etc. One example of a sequence which is not perfect is [2, 3, 3, 4], because, for example, the subsequence [2, 3, 4] is not an good as 2 ⋅ 4 < 2 + 3 + 4.
solution: #include <bits/stdc++.h>
  #pragma GCC optimize(2, 3, "Ofast")
  using namespace std;
  template <typename T1, typename T2>
  void ckmin(T1 &a, T2 b) {
    if (a > b) a = b;
  }
  template <typename T1, typename T2>
  void ckmax(T1 &a, T2 b) {
    if (a < b) a = b;
  }
  int read() {
    int x = 0, f = 0;
    char ch = getchar();
    while (!isdigit(ch)) f |= ch == '-', ch = getchar();
    while (isdigit(ch)) x = 10 * x + ch - '0', ch = getchar();
    return f ? -x : x;
  }
  template <typename T>
  void print(T x) {
    if (x < 0) putchar('-'), x = -x;
    if (x >= 10) print(x / 10);
    putchar(x % 10 + '0');
  }
  template <typename T>
  void print(T x, char let) {
    print(x), putchar(let);
  }
  const int N = 205;
  int fac[N], ifac[N];
  int n, mod, ans, a1;
  int dp[N][N][45], vis[N][N][45];
  inline int qpow(int a, int b = mod - 2) {
    int res = 1;
    while (b) {
      if (b & 1) res = 1ll * res * a % mod;
      a = 1ll * a * a % mod;
      b >>= 1;
    }
    return res;
  }
  int dfs(int i, int sum, int k) {
    if (i == n) return 1;
    if (!k) return ifac[n - i];
    if (vis[i][sum][k] == a1) return dp[i][sum][k];
    vis[i][sum][k] = a1;
    int &res = dp[i][sum][k];
    res = 0;
    int lim = (a1 - sum) / k;
    for (int cnt = 0; cnt <= lim; cnt++) {
      if (k > 1 && i + cnt < n + 1 - a1 - (k - 1)) continue;
      res = (res + 1ll * dfs(i + cnt, sum + cnt * k, k - 1) * ifac[cnt]) % mod;
    }
    return res;
  }
  int main() {
    n = read(), mod = read();
    fac[0] = ifac[0] = 1;
    for (int i = 1; i <= N - 1; i++) {
      fac[i] = 1ll * fac[i - 1] * i % mod;
      ifac[i] = qpow(fac[i]);
    }
    int lim = 2 * sqrt(n) + 1;
    for (a1 = max(1, n - lim); a1 <= n; a1++) {
      ans = (ans + dfs(0, 0, n + 1 - a1)) % mod;
    }
    print(1ll * fac[n] * ans % mod, '\n');
    return 0;
  }
  