SOLVE

LATER

Mogu Loves Numbers

Problem

Editorial

Analytics

Mogu loves those numbers that have the following property:-

- The number of divisors of the number are even.
- The number of divisors of the number are prime.

Given *L* and *R*, Mogu needs to find the count of numbers between *L* and *R* inclusive that follow the above properties.

As Mogu was unable to make it to the IUPC round 1 in Plinth '17, he has asked you to report the answer back to him.

**Note**: Both the properties should hold.

\(Input :\)

First line of the Input contains an integer *Q* denoting the number of queries.
Each of the next *Q* lines contain *2* integers *L* and *R*.

\(Output :\)

Output the count of such numbers in the range *L* and *R* inclusive that follow the given properties for each query.

\(Constraints\) :

\(1 \le Q \le 10^6\)

\(1 \le L \le 10^6\)

\(1 \le R \le 10^6\)

*L* can be \(\gt R\).

Time Limit:
1.0 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Marking Scheme:
Marks are awarded when all the testcases pass.

Allowed Languages:
C,
C++,
C++14,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Julia,
Kotlin,
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Swift,
Swift-4.1,
Visual Basic

Initializing Code Editor...

{"40ac9f0": "/pagelets/problem-author-tester/algorithm/hell-1/", "b08b019": "/pagelets/problems-hint/algorithm/hell-1/", "2c704a7": "/pagelets/recommended-problems/algorithm/hell-1/", "2268cae": "/pagelets/suggested-problems/algorithm/hell-1/", "e30923d": "/pagelets/show-submission/algorithm/hell-1/"}

realtime.hackerearth.com

80

57ec6303ced4aa50f8f9342bda2e684187c0eaed

58a29e5cae2309f04b28

/realtime/pusher/auth/