human
Check whether a number can be represented by sum of two squares | function to check if there exist two numbers sum of whose squares is n ..
store square value in hashmap.
Driver Code"
Solution in Python:
assistant
#Here is code to check whether a number can be represented by sum of two squares and the other steps required.
 def sumSquare ( n ) :
	s = dict ( )
	for i in range ( n ) :
		if i * i > n :
			break
		s [ i * i ] = 1
		if ( n - i * i ) in s . keys ( ) :
			print ( ( n - i * i ) ** ( 1 / 2 ) , " ^ 2 ▁ + " , i , " ^ 2" )
			return True
	return False
n = 1
if n == 1 :
	print ( '0 ^ 2 ▁ + ▁ 1 ^ 2' )
elif ( sumSquare ( n ) ) :
	print ( " Yes " )
else :
	print ( " No " )