3 comments

[ 82.4 ms ] story [ 945 ms ] thread
Seems like this is something like P = ((N * M) - (N + M - 1))/K but haven't tried out too many cases.