A shape's volume is the measure of how much three-dimensional space that shape occupies.
Challenge
Given six integers: [L,W,H]
as length, width and height of one container and [l,w,h]
as length, width and height of some random item.
You will need to calculate how many items would fit completely if the item was a liquid/fluid... and subtract how many items would also fit completely if the item was solid.
Note: Rotating the solid shape to fit empty space is required.
The input can be read from stdin, taken from args, can also be one or two lists/arrays, or any other valid way, but you can take in only six integers.
And the output should be one integer number: the difference.
Whole program or function are accepted.
Since this is code-golf shortest code in bytes wins!
Sample Input/Output
1) L=3 W=2 H=2 l=1 w=1 h=2
-> for item as liquid : 6 items fit completely
-> for item as solid : 6 items fit completely
output: 0
2) L=1 W=8 H=3 l=3 w=4 h=2
-> for item as liquid : 1 item fit completely
-> for item as solid : no items fit completely
output: 1
3) L=3 W=4 H=3 l=2 w=2 h=2
-> for item as liquid : 4 items fit completely
-> for item as solid : 2 items fit completely
output: 2
4) L=6 W=6 H=6 l=1 w=5 h=6
-> for item as liquid : 7 items fit completely
-> for item as solid : 7 items fit completely
output: 0
Draws
Just for illustration of how the solid items could fit: