I have a product which comes in sections. Its total length, and the sections it gets broken into, are at issue.
In some situations we will need to take an arbitrary product length (lets say 28000mm), and break it into an arbitrary number of equal sections.
I've been banging my head against it trying to solve it using GCD, but I think I am on the wrong track and I would appreciate some fresher minds having a look at it.
The rules for breaking it up are.
1) The longest any one section can be is 2800.
2) The total length will always be a multiple of 280.
The output I am looking for is the smallest number of sections the total length can be evenly broken into. From that I can get to everything else.
It's got to the frustration point where I don't even know if what I am looking for is possible!
In some situations we will need to take an arbitrary product length (lets say 28000mm), and break it into an arbitrary number of equal sections.
I've been banging my head against it trying to solve it using GCD, but I think I am on the wrong track and I would appreciate some fresher minds having a look at it.
The rules for breaking it up are.
1) The longest any one section can be is 2800.
2) The total length will always be a multiple of 280.
The output I am looking for is the smallest number of sections the total length can be evenly broken into. From that I can get to everything else.
It's got to the frustration point where I don't even know if what I am looking for is possible!