human
Give me a code to multiple of x closest to n and the other steps required given the following:
Multiple of x closest to n | Function to calculate the smallest multiple.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to multiple of x closest to n and the other steps required.
 def closestMultiple ( n , x ) :
	if x > n :
		return x ;
	z = ( int ) ( x / 2 ) ;
	n = n + z ;
	n = n - ( n % x ) ;
	return n ;
n = 56287 ;
x = 27 ;
print ( closestMultiple ( n , x ) ) ;