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.

cs_abhi | 62 |

kya_bolti_public | 56 |

Shubhankar Sharma | 44 |

vermaankush14291 | 42 |

coderquill | 40 |

PiyushPandey4 | 856 |

john_wick | 757 |

ASWATHAMA | 565 |

akhyasharma01 | 547 |

UsfShilpa | 536 |

blackshadows | 5362 |

Ibrahim Nash | 5242 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4598 |

Login to report an issue on this page.