human
Write me a code to number of moves required to guess a permutation given the following:
Number of moves required to guess a permutation . | Function that returns the required moves.
Final move.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to number of moves required to guess a permutation .
 def countMoves ( n ) :
	ct = 0
	for i in range ( 1 , n + 1 ) :
		ct += i * ( n - i )
	ct += n
	return ct
if __name__ == " _ _ main _ _ " :
	n = 3
	print ( countMoves ( n ) )