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 #142: Perfect Square Collection

Project Euler #142: Perfect Square Collection

Problem
Submissions
Leaderboard
Discussions

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

Print triples of integers such that , , and , , , , , are all perfect squares.

Input Format

The input contains a single integer, .

Constraints

Input #00:
Input #01:
Input #02:
Input #03:
Input #04:
Input #05:
Input #06:
Input #07:
Input #08:

Output Format

Output lines, where each line contains three integers separated by single spaces: , and .

Sample Input

1

Sample Output

472226642633 463877982992 452392145408

Explanation

The problem asks us to output a single triple . The sample output gives:



You can verify that:

You can output other triples aside from this, as long as they satisfy the constraints.

Author

kevinsogo

Difficulty

Easy

Max Score

100

Submitted By

241

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
  • Request a Feature