human
Smallest positive number made up of non | Function to find smallest positive number made up of non - repeating digits whose sum of its digits is equal to n.
No such number exists.
Stores the required answer.
Store the digit at unit 's place.
Iterate until n > digit.
Push digit at the start of res.
Decrement n by digit.
Decrement digit by 1.
Push the remaining number as the starting digit.
Print the required number.
Driver Code.
Function Call"
Solution in Python:
assistant
#Here is code to smallest positive number made up of non and the other steps required.
 def result ( n ) :
	if ( n > 45 ) :
		print ( - 1 , end = " " )
		return
	res = " "
	digit = 9
	while ( n > digit ) :
		res = str ( digit ) + res
		n -= digit
		digit -= 1
	if ( n > 0 ) :
		res = str ( n ) + res
	print ( res )
if __name__ == ' _ _ main _ _ ' :
	N = 19
	result ( N )