For a number **N ** **f(N) **= the total number of parts in the partitions of **N** into equal parts.

**For example**

if the given number is 4, the equal partitions will be:

{1,1,1,1} ->total parts=4

{2,2} -> total parts=2

{4} -> total parts=1

So, the total number of parts in the partition of 4 into equal parts is 7.

Now you are given two number **l,r**. find the sum of f(i) for i=l to r.(both inclusive)

**Input:**

First line of input contains a single integer **T** denoting the number of test cases.

Each line of test case containing two space separated integers **l** and **r** as described in the problem statement.

**Output:**

For each test case, output a single integer containing the sum as described in the problem statement.

**Constraints:**

1<=T<=100

1<=l<=r<=10^7

**Example:**

**Input**

1

1 2

**Output**

4

Author: pra1nay7_313

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

_Shubham_Jain_06 | 404 |

maggiiiii | 315 |

Savage_19 | 310 |

ritikdagar0203 | 241 |

thanuvinu94 | 233 |

Bishnu Dev Panda | 810 |

_Shubham_Jain_06 | 715 |

okayboss | 652 |

maggiiiii | 598 |

Savage_19 | 576 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4925 |

Quandray | 4547 |

Login to report an issue on this page.