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.

agness | 122 |

aman1931998 | 102 |

Survivor | 100 |

uchitnitk | 96 |

lonecoder | 95 |

KshatriyaYash | 1066 |

nikhil_sojan | 1032 |

lonecoder | 1030 |

mazumderrohit8 | 899 |

SumitSingh27 | 832 |

blackshadows | 5327 |

Ibrahim Nash | 5215 |

akhayrutdinov | 5111 |

mb1973 | 4492 |

Quandray | 4444 |

Login to report an issue on this page.