Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Mathimatics-Numerical algorithms Data structs
Title: 1344 Download
 Description: 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.
 Downloaders recently: [More information of uploader zhao]
 To Search:
File list (Check if you may need any files):
 

Untitled2.c
Untitled2.exe
Untitled2.o
    

CodeBus www.codebus.net