Let $k$, $m$ and $n$ be integers such that $1<n \leq m-1 \leq k$. Find maximum size of subset $S$ of set $\{1,2,...,k\}$ such that sum of any $n$ different elements from $S$ is not:
$a)$ equal to $m$,
$b)$ exceeding $m$ 
To find the maximum size of subset \( S \) of the set \(\{1, 2, \ldots, k\}\) such that the sum of any \( n \) different elements from \( S \) does not exceed \( m \), we need to follow these steps:

1. **Establish the lower bound for the sum of \( n \) elements:**
   If \( |S| \ge n \) and \( A \subset S \) is an \( n \)-set, then the sum of the smallest \( n \) elements in \( S \) is at least the sum of the first \( n \) natural numbers:
   \[
   \sigma(A) \ge \frac{n(n+1)}{2}
   \]
   Therefore, for \( S \) to exist, we must have:
   \[
   \frac{n(n+1)}{2} \le m
   \]

2. **Determine the upper bound for the sum of \( n \) elements:**
   If \( |S| = p \ge n \), we can write \( S = \{x_1, x_2, \ldots, x_p\} \) with \( x_i \) in increasing order. We have \( x_i \ge i \) for all \( i \). Consider the subset \( A := \{x_{p-(n-1)}, x_{p-(n-2)}, \ldots, x_p\} \). The sum of the elements in \( A \) is:
   \[
   \sigma(A) = x_{p-(n-1)} + x_{p-(n-2)} + \cdots + x_p
   \]
   Since \( x_i \ge i \), we have:
   \[
   x_{p-(n-1)} \ge p-(n-1), \quad x_{p-(n-2)} \ge p-(n-2), \quad \ldots, \quad x_p \ge p
   \]
   Therefore:
   \[
   \sigma(A) \ge (p-(n-1)) + (p-(n-2)) + \cdots + p = np - \frac{n(n-1)}{2}
   \]
   For \( \sigma(A) \le m \), we need:
   \[
   np - \frac{n(n-1)}{2} \le m
   \]
   Solving for \( p \):
   \[
   np \le m + \frac{n(n-1)}{2}
   \]
   \[
   p \le \frac{m}{n} + \frac{n-1}{2}
   \]

3. **Maximize \( p \):**
   The maximum size of \( S \) is given by:
   \[
   p_{\max} = \left\lfloor \frac{m}{n} + \frac{n-1}{2} \right\rfloor
   \]
   where \( \left\lfloor \cdot \right\rfloor \) denotes the floor function, which gives the greatest integer less than or equal to the given expression.

The final answer is \( \boxed{\left\lfloor \frac{m}{n} + \frac{n-1}{2} \right\rfloor} \).