Question: QUESTION Integer Tuples Computation ( CodeRush January' 2 4 ) Time Limit: 2 , Memory Limit 1 2 8 0 0 0 For a positive

QUESTION
Integer Tuples Computation (CodeRush January'24)
Time Limit: 2, Memory Limit 128000
For a positive integer N, let function f be defined as f(N)= the number of tuples (A,B,C) of positive integers that satisfy the equation AB+C=N.
Given a two integers I and )(r, compute S=f(1)+f(I+1)+f(I+2)..f(r).
Formally, for two given integers I and r, compute the sum of f(i) for all ||ir.
Input
The first line of the input contains a single integer T, the number of test cases.
The following T lines each contain two integers I and r each, where the i- th pair denotes the i- th test case.
Constraints:
1T1000
11r1000000 for each test case
 QUESTION Integer Tuples Computation (CodeRush January'24) Time Limit: 2, Memory Limit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!