Language: C++

//17:30
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <map>

using namespace std;
typedef long long ll;
ll max(ll a, ll b){return(a>b)?a:b;}
ll min(ll a, ll b){return(a<b)?a:b;}
ll abss(ll a){return(a<0)?-a:a;}

int array[200];
int newarray[200];
int cnt[200];
int arr_ind = 0;
int newarr_ind = 0;

void soinsuubunkai(int M){
        int n = M;
        int i = 2;
        while(M != 1){
                if(M % i == 0){
                        M /= i;
                        array[arr_ind++] = i;
                }else{
                        i++;
                }
        }
}

#define CACHE_N 100000
#define CACHE_R 10
ll cache[CACHE_N][CACHE_R];

ll combination(int n, int r){
        //printf("n=%d,r=%d\n",n,r);
        r = min(n-r,r);

        if(n < CACHE_N && r < CACHE_R && cache[n][r] != -1){
                return cache[n][r];
        }
        if(n == r || r == 0) return 1;
        else if(r == 1) return n;
        else{
                ll ans1 = combination(n-1,r-1);
                ans1 %= 1000000007;
                ll ans2 = combination(n-1,r);
                ans2 %= 1000000007;
                ll ans = ans1+ans2;
                ans %= 1000000007;

                if(n < CACHE_N && r < CACHE_R){
                        cache[n][r] = ans;
                }
                return ans;
        }
}

int N,M;
int main(){
        scanf("%d %d",&N,&M);
        soinsuubunkai(M);
        for(int i = 0; i < CACHE_N; i++){
                for(int j = 0; j < CACHE_R; j++){
                        cache[i][j] = -1;
                }
        }
        int i = 1;
        int before = array[0];
        newarray[0] = before;
        cnt[0] = 1;
        while(i < arr_ind){
                if(before == array[i]){
                        cnt[newarr_ind]++;
                        i++;
                }else{
                        newarr_ind++;
                        cnt[newarr_ind] = 1;
                        newarray[newarr_ind] = array[i];
                        before = array[i];
                        i++;
                }
        }
        ll ans = 1;
        for(int i = 0; i <= newarr_ind; i++){
                ans *= combination(cnt[i]+N-1,cnt[i]);
                ans %= 1000000007;
        }
        printf("%lld\n",ans);
}

Compiler output:
a.cc: In function 'void soinsuubunkai(int)':
a.cc:26:25: error: reference to 'array' is ambiguous
   26 |                         array[arr_ind++] = i;
      |                         ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:14:5: note:                 'int array [200]'
   14 | int array[200];
      |     ^~~~~
a.cc: In function 'int main()':
a.cc:71:22: error: reference to 'array' is ambiguous
   71 |         int before = array[0];
      |                      ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:14:5: note:                 'int array [200]'
   14 | int array[200];
      |     ^~~~~
a.cc:75:30: error: reference to 'array' is ambiguous
   75 |                 if(before == array[i]){
      |                              ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:14:5: note:                 'int array [200]'
   14 | int array[200];
      |     ^~~~~
a.cc:81:48: error: reference to 'array' is ambiguous
   81 |                         newarray[newarr_ind] = array[i];
      |                                                ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:14:5: note:                 'int array [200]'
   14 | int array[200];
      |     ^~~~~
a.cc:82:34: error: reference to 'array' is ambiguous
   82 |                         before = array[i];
      |                                  ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:14:5: note:                 'int array [200]'
   14 | int array[200];
      |     ^~~~~