We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #187: Semiprimes

Project Euler #187: Semiprimes

Problem
Submissions
Leaderboard
Discussions

This problem is a programming version of Problem 187 from projecteuler.net

A composite is a number containing at least two prime factors. For example, ; ; .

There are ten composites below thirty containing precisely two, not necessarily distinct, prime factors: , , , , , , , , , .

How many composite integers , , have precisely two, not necessarily distinct, prime factors?

Input Format

The first line of each test file contains a single integer , the number of test cases. lines follow, each containing a single integer .

Constraints


Output Format

Output exactly lines with a single number on each - an answer to the corresponding test case.

Sample Input

1
5

Sample Output

1

Author

bayleef

Difficulty

Medium

Max Score

100

Submitted By

1348

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy