# Sugar - cuboid

Pejko received from his master cuboid composed of identical sugar cubes with count between 1000 and 2000. The Pejko eat sugar cubes in layers.
The first day eat one layer from the front, second day one layer from right, the third day one layer above. Yet in those three layers were each the same number of cubes. Find out how many cubes had original cuboid. Determine all possibilities.

Result

V1 =  1320
V2 =  1716

#### Solution: ```PHP program:

for(\$a=1; \$a<1000; \$a++)
{
for(\$b=1; \$b<1000; \$b++)
{
for(\$c=1; \$c<1000; \$c++)
{
\$V = \$a*\$b*\$c;
if(\$V > 2000 || \$V<1000)
{
continue;
}

if(\$a*\$b == (\$c-1)*\$b && (\$c-1)*\$b == (\$a-1)*(\$c-1))
{
echo "\$V = \$a * \$b * \$c <br>";
}
}
}
}
```

Leave us a comment of example and its solution (i.e. if it is still somewhat unclear...): Be the first to comment! #### To solve this example are needed these knowledge from mathematics:

Do you solve Diofant problems and looking for a calculator of Diofant integer equations? Tip: Our volume units converter will help you with converion of volume units.

## Next similar examples:

1. Rectangular cuboid The rectangular cuboid has a surface area 5334 cm2, its dimensions are in the ratio 2:4:5. Find the volume of this rectangular cuboid.
2. Tanks Fire tank has cuboid shape with a rectangular floor measuring 13.7 m × 9.8 m. Water depth is 2.4 m. Water was pumped from the tank into barrels with a capacity of 2.7 hl. How many barrels were used, if the water level in the tank fallen 5 cm? Wr
3. Prism X The prism with the edges of the lengths x cm, 2x cm and 3x cm has volume 20250 cm3. What is the area of surface of the prism?
4. Air mass What is the weight of the air in a classroom with dimensions 10 m × 0 m × 2.5 m ? The air density is 1.293 kg/m3.
5. Aquarium Can 30 liters of water fit in a cuboid aquarium with dimensions a = 3dm b = 6dm c = 5dm?
6. TV transmitter The volume of water in the rectangular swimming pool is 6998.4 hectoliters. The promotional leaflet states that if we wanted all the pool water to flow into a regular quadrangle with a base edge equal to the average depth of the pool, the prism would have.
7. Cuboid Cuboid with edge a=16 cm and body diagonal u=45 cm has volume V=11840 cm3. Calculate the length of the other edges.
8. Pool The swimming pool is 10 m wide and 8 m long and 153 cm deep. How many hectoliters of water is in it, if the water is 30 cm below its upper edge?
9. Transforming cuboid Cuboid with dimensions 8 cm, 13 and 16 cm is converted into a cube with the same volume. What is its edge length?
10. Rainfall Annual rainfall in our country are an average of 797 mm. How many m3 of water rains on average per hectare?
11. The pot The pot is in 1/3 filled with water. Bottom of the pot has an area of ​​329 cm2. How many centimeters rises water level in the pot after add 1.2 liters of water?
12. Air Room is 40.1 m long, 25.2 dm wide and 369 cm high. How many people can simultaneously be in this room if for hygiene reasons is calculated 5100 dm3 of air per person?
13. Tetrapack How high should be the milk box in the shape of a prism with base dimensions 8 cm and 8.8 cm if its volume is 1 liter?
14. Hole They fill shape hole with dimensions 2.9 m, 17 m, 15.2 m with 97 m3 of soil. How many percent it fill up?
15. Prism The base of the prism is a rhombus with a side 30 cm and height 27 cm. The height of the prism is 180% longer than the side length of the rhombus. Calculate the volume of the prism.
16. Aquarium Aquarium is rectangular box with square base containing 76 liters of water. Length of base edge is 42 cm. To what height the water level goes?
17. Balls Ping pong balls have a diameter of approximately 4.6 cm. They are sold in boxes of 4 pieces: each box has the shape of a cuboid with a square base. The balls touch the walls of the box. Calculate what portion of the internal volume of the box is filled w