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 #87: Prime power triples

Project Euler #87: Prime power triples

Problem
Submissions
Leaderboard
Discussions

The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28. In fact, there are exactly four numbers below fifty that can be expressed in such a way:




Given an integer , Find out how many numbers less than or equal to are there that can be expressed as a sum of a prime square , prime cube and prime fourth power.

Input Format

First line contains an integer denoting the number of testcases.
The next lines contain integer .

Constraints


Output Format

The line containing the answer for the testcase.

Sample Input

1
50

Sample Output

4

Author

shashank21j

Difficulty

Easy

Max Score

100

Submitted By

1799

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