Checking if N * T is less than the remaining K . If it is , then arr [ i ] is the first element in the required pair
if ( t * n > k ) : NEW_LINE INDENT break NEW_LINE DEDENT k = k - t * n NEW_LINE i += t NEW_LINE