I’m trying to answer this problem:
My solution for this problem is to create as many pieces as I can that somehow satisfy N, M, and K all in one go. However, I feel this is too complicated to do as I am not even sure how to go about it. Are there less complicated ways of solving this problem? Don’t give the actual answer. Just hints will do since I’m stuck.