1

I need to find the higest possible value to multiply with in the following senario.

I have a collection of items, all items are of the same type and thay have a fixed number of columns.

The problem is that i need to find out what the higest possible value that i can multiply with.

X is the fixed size of an item column size, in this case 9. Y is unkown i dont know how to find out the highest possible value here. M is the maximum allowed size in one set of items, in this case 2100.

$$ XY \leq M,\quad 9Y\leq 2100$$

I have not managed to come up with any formula to get Y.

jkn
  • 5,129
  • 25
  • 53

1 Answers1

0

You're looking (I think) for the greatest integer $Y$ such that $9Y\le2100.$ That is, the greatest integer less than or equal to $$\frac{2100}9=\frac{700}3=\frac{699}3+\frac13=233+\frac13.$$ Can you see what that integer is?

More generally, given $X$ and $M$, your maximum $Y$ will be $$\left\lfloor\frac{M}{X}\right\rfloor,$$ where $\lfloor\cdot\rfloor$ is the floor function.

Cameron Buie
  • 102,994