If S can cannot be represented as sum of K integers
if ( S < min_sum or S > max_sum ) : NEW_LINE INDENT print ( " - 1" ) NEW_LINE return NEW_LINE DEDENT s1 = 0 NEW_LINE nums = [ ] NEW_LINE for i in range ( 1 , N + 1 ) : NEW_LINE