vbansal027's blog

By vbansal027, history, 8 years ago, In English

Can somebody please explain, why in the following question,
http://codeforces.net/problemset/problem/576/A are we checking with all the powers of a prime whether the given number is divisible or not? why don't we stop, for a prime factor, as soon as we find its first power that is either greater than n or doesn't divide it completely ?

Full text and comments »

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