There are atmost 10 valid Strings for n = 1
if ( K > 10 ) : NEW_LINE INDENT return " - 1" NEW_LINE DEDENT s = " " NEW_LINE K -= 1 NEW_LINE s += ( K + '0' ) NEW_LINE return s NEW_LINE ans = " - 1" NEW_LINE s = " " NEW_LINE