human
Find the permutation of first N natural numbers such that sum of i % Pi is maximum possible | Function to find the permutation of the first N natural numbers such that the sum of ( i % Pi ) is maximum possible and return the maximum sum.
Driver code.
Function call"
Solution in Python:

What is a code to find the permutation of first N natural numbers such that sum of i % Pi is maximum possible and the other steps required?
assistant
#Here is code to find the permutation of first N natural numbers such that sum of i % Pi is maximum possible and the other steps required.
 def Max_Sum ( n ) :
	return ( n * ( n - 1 ) ) // 2 ;
if __name__ == " _ _ main _ _ " :
	n = 8 ;
	print ( Max_Sum ( n ) ) ;