Iterate over all possible values of s and if it is a valid S then proceed further
for s in range ( n , 9 * n + 1 , 1 ) : NEW_LINE INDENT if ( check ( s , a , b ) == 0 ) : NEW_LINE INDENT continue NEW_LINE DEDENT DEDENT