Skip to content

Given N,find the pythagorean triplets(if any exists),for N as one of the sides of the triangle.

Notifications You must be signed in to change notification settings

Senkaidrago/pythagorean_triplets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

pythagorean_triplets

Given N,find the pythagorean triplets(if any exists),for N as one of the sides of the triangle.

PYTHAGORAS TRIPLET Given a number N (denoting one of the legs of the triangle), Print its Pythagoras pair in increasing order if they exist. Otherwise, print "-1".

Input Format: A single integer N

Constraints: N <= 10^9

Output Format Two numbers X and Y denoting the rest of the numbers of the Pythagorean triplet in increasing order.

Sample Input: 3 Sample Output: 4 5

About

Given N,find the pythagorean triplets(if any exists),for N as one of the sides of the triangle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages