Description
Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 200200 points
Problem Statement
How many triples of non-negative integers (a, b, c)(a,b,c) satisfy a+b+c \leq Sa+b+c≤S and a \times b \times c \leq Ta×b×c≤T?
Constraints
-
0 \leq S \leq 1000≤S≤100
-
0 \leq T \leq 100000≤T≤10000
-
SS and TT are integers.
Input
Input is given from Standard Input in the following format:
SSTT
Output
Print the number of triples of non-negative integers (a,b,c)(a,b,c) satisfying the conditions.
HINT
The triples (a,b,c)(a,b,c) satisfying the conditions are (0,0,0)(0,0,0), (0,0,1)(0,0,1), (0,1,0)(0,1,0), and (1,0,0)(1,0,0) ― there are four of them.