parameters: (self, queries)
return_statement: return result
docstring: :type queries: List[List[int]]
          :rtype: List[int]
docstring_summary: :type queries: List[List[int]]
          :rtype: List[int]
docstring_tokens: : type queries : List [ List [ int ]] : rtype : List [ int ]
function: def waysToFillArray(self, queries):
          """
          :type queries: List[List[int]]
          :rtype: List[int]
          """
          def nCr(n, k, mod):
              return (fact[n]*inv_fact[n-k] % mod) * inv_fact[k] % mod
          
          def get_factors(k):
              factors = collections.Counter()
              while k > 1:
                  factors[sieve[k]] += 1
                  k //= sieve[k]
              return factors
  
          result = []
          for n, k in queries:
              factors = get_factors(k)
              curr = 1
              for f in factors.itervalues():
                  curr *= nCr(f+n-1,f, MOD)  # H(n, f)
              result.append(curr % MOD)
          return result
function_tokens: def waysToFillArray ( self , queries ) : def nCr ( n , k , mod ) : return ( fact [ n ] * inv_fact [ n - k ] % mod ) * inv_fact [ k ] % mod def get_factors ( k ) : factors = collections . Counter ( ) while k > 1 : factors [ sieve [ k ] ] += 1 k //= sieve [ k ] return factors result = [ ] for n , k in queries : factors = get_factors ( k ) curr = 1 for f in factors . itervalues ( ) : curr *= nCr ( f + n - 1 , f , MOD ) # H(n, f) result . append ( curr % MOD ) return result