Abundant number
Statement
Goal
An abundant number is a number that is less than the sum of its proper divisors (divisors excluding the number itself).For example, the proper divisors of 12 are 1, 2, 3, 4, and 6.
The sum 1+2+3+4+6 = 16, which is greater than 12. Therefore 12 is an abundant number.
Calculate the count of abundant numbers between an integer a and an integer b (a and b included).
Input
Line 1 : An integer a
Line 2 : An integer b
Line 2 : An integer b
Output
Line 1 : The number of abundant numbers between a and b inclusive
Constraints
0 < a < b < 1000000
Example
Input
1 40
Output
7
Game modes
Fastest, Shortest
Test cases
Test 1 Test
Input
1
40
Output
7
Validator 1 Validator
Input
4
20
Output
3
Test 2 Test
Input
10
86
Output
18
Validator 2 Validator
Input
13
78
Output
15
Test 3 Test
Input
100
200
Output
25
Validator 3 Validator
Input
46
116
Output
19
Test 4 Test
Input
256
1000
Output
188
Validator 4 Validator
Input
387
3109
Output
676
Test 5 Test
Input
1000
10000
Output
2243
Validator 5 Validator
Input
999
10020
Output
2248
Getting bigger Test
Input
50000
123456
Output
18199
Validator 6 Validator
Input
54321
100000
Output
11324
Max range Test
Input
1
999999
Output
247544
Validator 7 Validator
Input
1
999989
Output
247540
Solution language
Solution
Stub generator input