NDIV - n-divisors

We all know about prime numbers, prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

We can classify the numbers by its number of divisors, as n-divisors-numbers, for example number 1 is 1-divisor number, number 4 is 3-divisors-number... etc.

Note: All prime numbers are 2-divisors numbers.

Example:
8 is a 4-divisors-number [1, 2, 4, 8].

Input

Three integers a, b, n.

Output

Print single line the number of n-divisors numbers between a and b inclusive.

Example

Input:
1 7 2

Output:
4

Constraints

1 <= a, b <=10^9
0 <= b - a <= 10^4
1 <= n <= 100


Added by:abdelkarim
Date:2012-12-07
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Owner

hide comments
2014-07-02 09:55:05 P_Quantum
nice!!
2014-04-25 01:37:51 hossamyosef
I think the output should be the number of mistakes on the problem statement. :v :v

(abdelkarim) i think you can talk about the problem statement after solving the problem it self :P


Last edit: 2014-04-25 01:20:58
2014-04-25 01:37:51 Priyanshu Srivastava
0.01 s....Top of the table.. :D

Last edit: 2013-08-28 07:03:13
2014-04-25 01:37:51 Sandeep Pathry
Ahhh!... finally gave a best solution... AC 0.02s...
nice problem :)

(abdelkarim) nice work ;-) .

Last edit: 2013-08-13 18:51:21
2014-04-25 01:37:51 Ivica Kièiæ
It's great that I've seen a - b <= 10^4 constraint in time... Never mind, AC is AC :D

Last edit: 2013-05-24 18:30:26
2014-04-25 01:37:51 rishabhshinghal
Finally got AC with 0.19 sec
2014-04-25 01:37:51 saket diwakar
AC...:)
2014-04-25 01:37:51 (Tjandra Satria Gunawan)(曾毅昆)
@Pranshul Agarwal: wow.. 0.02s, I can't imagine that it's possible to reach that time for this problem in pyramid cluster.. Congratulations..
2014-04-25 01:37:51 abdelkarim
@Pranshul Agarwal
congratulation awesome code :D :D .
2014-04-25 01:37:51 Pranshul Agarwal
AC in 0.02 sec.. :D rank 1!!! :D
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.