Maximum number of distinct substrings
Pyth, 12 bytes
l.Ml{.:Z)^UE

Try it online.
Pure brute force.
Explanation

Implicit: append Q to the program.
Implicit: read and evaluate a line of input (n) in Q.
E: read and evaluate a line of input (k).
U: get a range [0, ..., k-1].
^: get all n-length strings of [0, ..., k-1].
.M: find the ones that give a maximum for function f(Z):

.:Z: find the substrings of Z
{: remove duplicates
l: get the number of unique substrings


l: get the number of such strings