Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

LOLBYECYALOL's blog

By LOLBYECYALOL, history, 5 years ago, In English

Problem Link: http://codeforces.com/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!

  • Vote: I like it
  • +6
  • Vote: I do not like it

»
5 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

Hint:

Spoiler

Solution:

Spoiler
  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    Got it, thank you! Never realized I could use the fact that B was bounded by 10^3.