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++,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Scala 2.11.8,
Swift,
Visual Basic

Initializing Code Editor...

{"6536a8c": "/pagelets/suggested-problems/algorithm/hell-1/", "6536b86": "/pagelets/recommended-problems/algorithm/hell-1/", "6536b15": "/pagelets/problem-author-tester/algorithm/hell-1/", "6536a19": "/pagelets/show-submission/algorithm/hell-1/", "6536b44": "/pagelets/problems-hint/algorithm/hell-1/"}

{}

realtime.hackerearth.com

80

57ec6303ced4aa50f8f9342bda2e684187c0eaed

58a29e5cae2309f04b28

/realtime/pusher/auth/