ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1055. Combinations

Hints for those who got TLE~
Posted by xcheng 4 Sep 2007 19:46
~.~
There is a trick in finding divsors.
For example,the number of k divisor from 1~N is
F(N)=N div k+N div (k*k)+N div (k*k*k)......

So we can just calc F(N)-F(M)-F(N-M) for every divisor that is between 1 and N.