文件名称:1344
介绍说明--下载内容均来自于网络,请自行研究使用
Given a positive integer n, find two non-negative integers a, b such that a2 + b2 = n.
The first line contains the number of test cases T (1 <= T <= 1000).
For each test case, there is only one line with an integer n (1 <= n <= 109) as defined above.
For each test case, output two integers a, b separated by a single space such that a2 + b2= n. If there are multiple solutions, anyone will be accepted. If there is no solution, output “-1” (without quotation marks) instead.-Given a positive integer n, find two non-negative integers a, b such that a2+ b2 = n. The first line contains the number of test cases T (1 < = T < = 1000). For each test case, there is only one line with an integer n (1 < = n < = 109) as defined above. For each test case, output two integers a, b separated by a single space such that a2+ b2 = n. If there are multiple solutions, anyone will be accepted. If there is no solution, output " -1" (without quotation marks) instead.
The first line contains the number of test cases T (1 <= T <= 1000).
For each test case, there is only one line with an integer n (1 <= n <= 109) as defined above.
For each test case, output two integers a, b separated by a single space such that a2 + b2= n. If there are multiple solutions, anyone will be accepted. If there is no solution, output “-1” (without quotation marks) instead.-Given a positive integer n, find two non-negative integers a, b such that a2+ b2 = n. The first line contains the number of test cases T (1 < = T < = 1000). For each test case, there is only one line with an integer n (1 < = n < = 109) as defined above. For each test case, output two integers a, b separated by a single space such that a2+ b2 = n. If there are multiple solutions, anyone will be accepted. If there is no solution, output " -1" (without quotation marks) instead.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Untitled2.c
Untitled2.exe
Untitled2.o