NDIV  ndivisors
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 ndivisorsnumbers, for example number 1 is 1divisor number, number 4 is 3divisorsnumber... etc.
Note: All prime numbers are 2divisors numbers.
Example:
8 is a 4divisorsnumber [1, 2, 4, 8].
Input
Three integers a, b, n.
Output
Print single line the number of ndivisors 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
hide comments
gargmehul10:
20180323 12:19:30
Without using sieve { doing prime factorization in sqrt(n) }, long gives TLE but int gives AC! How ??? Last edit: 20180323 12:26:21 

beastgmr:
20180322 07:35:47
Last edit: 20180322 07:37:32 

hottest:
20180112 11:50:52
using long gives tle,int gives ac 

vishwanath_26:
20170830 14:58:22
AC 0.00 s!!! Last edit: 20180815 19:23:17 

amulyagaur:
20170721 21:23:34
0.00 s with segmented sieve for divisors 

sam128:
20170710 21:05:22
use fast i/o for this problem..also sieving must be done till sqrt(10^9). 

luvk1412:
20170526 02:23:59
AC in 1 go, nice question, 0.00 sec :D 

mastik5h_1998:
20170321 17:20:25
strict time limit but AC...


scorpion_ajay:
20170108 04:22:50
this is an easy one if you understand the concept of prime factorization and sieve :) 

awesomeabhinav:
20170101 18:02:32
I m getting TLE, I think my solution is efficient. PLEASE HELP

Added by:  abdelkarim 
Date:  20121207 
Time limit:  0.221s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Owner 