There are N items in a market (indexed from 1 to N) each having a particular cost. The danger value of each item is given by the following pseudo code:
Danger(cost) {
danger_val = 0
for ( each i from 1 to cost) {
if( cost modulo i is 0 ) {
increase danger_val by 1
}
}
return danger_val
}
You are given Q queries which contain a range of items.
You need to find the number of pairs of items that have the same danger value.
Input format
Output format
For each query, print the number of pairs of items that have the same danger value.
Constraints
Danger values are for the given sample input.
Pairs having same danger value for :
Query 1. 1st and 3rd item.
Query 2. No pair
Query 3. 1st and 3rd item.
Query 4. No pair