Solve for minimum and maximum value of dct coefficient
The max value for a DCT coefficient with this formula would be when $k_1 = 0$ and $k_2 = 0$. Using this give us the $\cos(0) = 1$ so you simply sum up the pixel values. Since the pixel values are $0-255$, then the max value is $64*255 = 16320$.
The min value can be computed by putting a pixel value of $255$ whenever the product of the cosines is negative, and a zero when it is positive. You would have to iterate through the $k_1$ and $k_2$ values to find the smallest value.