[Solution] Pythagorean Pair CodeChef Solution
Problem
Chef has an integer . It is known that the largest odd divisor of does not exceed .
Determine two non-negative integers and such that , or report that no such pair exists.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of a single integer .
Output Format
For each test case, output space-separated and such that or if no such pair exists.
👇👇👇👇👇
Explanation:
Test case : A possible pair such that is . Here, .
Test case : There is no pair such that .
Test case : A possible pair such that is . Here,
Test case : A possible pair such that is . Here, .
No comments:
Post a Comment