human
Sum of the digits of square of the given number which has only 1 's as its digits | Function to return the sum of the digits of num ^ 2.
To store the number of 1 's.
Find the sum of the digits of num ^ 2.
Driver code"
How can the above be solved in Python?
 What is a code to sum of the digits of square of the given number which has only 1 's as its digits and the other steps required?
assistant
#Here is code to sum of the digits of square of the given number which has only 1 's as its digits and the other steps required.
 def squareDigitSum ( num ) :
	lengthN = len ( num )
	result = ( lengthN // 9 ) * 81 + ( lengthN % 9 ) ** 2
	return result
if __name__ == " _ _ main _ _ " :
	N = "1111"
	print ( squareDigitSum ( N ) )