How to solve problem C from USP-ICMC 2018?

Правка en1, от LOLBYECYALOL, 2018-10-28 00:00:47

Problem Link: http://codeforces.net/gym/101875/problem/C

Hi,

I was recently trying the aforementioned question. My idea was: I can find all primes up to 1e6, after that I can do the prime decomposition of each of the v[i] and find the overall prime decomposition of a, in the form p_1^x_1 * p_2^x_2 .. p_n^x_n.

But after this, I'm stuck with how to find the number of divisors of a number (from its prime decomposition) that have exactly b divisors.

Any help would be highly appreciated!

Теги #number theory, #primes, #gym

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский LOLBYECYALOL 2018-10-28 00:00:47 543 Initial revision (published)