human
Check whether a number can be represented as sum of K distinct positive integers | Function that returns true if n can be represented as the sum of exactly k distinct positive integers.
If n can be represented as 1 + 2 + 3 + ... + ( k - 1 ) + ( k + x ).
Driver code"
How can the above be solved in Python?
 Give me a code to check whether a number can be represented as sum of K distinct positive integers and the other steps required?
assistant
#Here is code to check whether a number can be represented as sum of K distinct positive integers and the other steps required.
 def solve ( n , k ) :
	if ( n >= ( k * ( k + 1 ) ) // 2 ) :
		return True
	return False
if __name__ == ' _ _ main _ _ ' :
	n = 12
	k = 4
	if ( solve ( n , k ) ) :
		print ( " Yes " )
	else :
		print ( " No " )