Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 401 Weeks Ago, 2 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Accounting Posted 27 Sep 2017 My Price 10.00

Virat’s friend Jadega

Virat is a guy who likes solving problems very much. Today Virat’s friend Jadega gave him a problem to solve. Jadeja gives Virat three numbers: N, L and R and Virat has to find out the count of numbers between L and R(both inclusive) which are divisible by at least 1 prime number belonging to range 1 to N(inclusive).

Though Virat likes to solve problems, this one seems too hard for him to solve. So he turns to you in order to solve the problem. Now it is your job to solve this problem for Virat.

Input

  • First line of input contains number of test cases T.
  • Each of next T lines contain 3 space separated integers: N,L and R as described in the problem statement.

Output

  • For each test case, print a single line having the count of numbers between L and R (both inclusive) which are divisible by at least 1 prime number belonging to range 1 to N (inclusive).

Constraints

  • 1 = T = 10
  • 2 = N = 50
  • 1 = L = R = 1018

Example

Input 2 6 1 15 10 17 29 Output 11 9

Explanation

    • In the 1st test case, primes in the range 1 to 6 are 2, 3 and 5. The numbers in the range 1 to 15 which are divisible by any of 2,3 or 5 are 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15 (total 11).

 

  • In the 2nd test case, prime in the range 1 to 10 are 2, 3, 5 and 7. The number in the range 17 to 29 which are divisible by any of these primes are 18, 20, 21, 22, 24, 25, 26, 27, 28 (total 9)

Answers

(5)
Status NEW Posted 27 Sep 2017 10:09 PM My Price 10.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)