da.2396's blog

By da.2396, history, 8 years ago, In English

Ques was to find Kth minimum divisor of N! my soln is http://pastebin.com/SwjJvp6E.

However I am getting it as a WA . is there any edge cases that I am missing?

Ques link : http://codeforces.me/group/gRkn7bDfsN/contest/210680/problem/B

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Try this: 4 7

The way you check whether k is a divisor of N! isn't correct.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Total number of divisors of n! can be 2^(n-1).

So you can precalculated upto 2*N minimum divisors and check the K-th divisor.