If sum of adjacent characters is K mark the starting index and set flag to 1
if ( ord ( s [ i ] ) - ord ( '0' ) + ord ( s [ i + 1 ] ) - ord ( '0' ) == k and flag == 0 ) : NEW_LINE INDENT flag = 1 NEW_LINE start_ind = i NEW_LINE DEDENT