Product Triplet
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
You are given six integers: minx, maxx, miny, maxy, minz and maxz. Find the number of triplets of integers (x,y,z) that satisfy the following three conditions:
x is between minx and maxx, inclusive;
y is between miny and maxy, inclusive;
z is between minz and maxz, inclusive;
x * y = z;
Input
Each line contains six integers minx, maxx, miny, maxy, minz and maxz. It is known that 1 ≤ maxx, maxy, maxz ≤ 10^9, 1 ≤ minx ≤ maxx, 1 ≤ miny ≤ maxy, 1 ≤ minz ≤ maxz.
Output
For each line of input print in a separate line the number of triplets of integers (x,y,z) that satisfy the given above conditions.
Examples
Input #1
Answer #1
Submissions 147
Acceptance rate 56%