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

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #108: Diophantine reciprocals I

Project Euler #108: Diophantine reciprocals I

Contest ends in
Problem
Submissions
Leaderboard
Discussions

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

In the following equation are positive integers.

For there are exactly three distinct solutions:

Find the number of distinct solutions for a given value of

Input Format

First line containts i.e. number of testcases, each of the lines contains an integer

Constraints


Output Format

Print the answer for each testcase on a new line.

Sample Input

3
4
7
9

Sample Output

3
2
3

Author

shashank21j

Difficulty

Easy

Max Score

100

Submitted By

777

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