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:

Solution in text V__1 =
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...):

Showing 0 comments:
1st comment
Be the first to comment!
avatar




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. Z9-I-4
    numbers_30 Kate thought a five-digit integer. She wrote the sum of this number and its half at the first line to the workbook. On the second line wrote a total of this number and its one fifth. On the third row she wrote a sum of this number and its one nines. Fi
  2. Cakes Z8-I-5
    cukriky_5 Mom brought 10 cakes of three types: kokosek was less than laskonek and most were caramel cubes. John chose two different kinds of cakes, Stephan did the same and for Margerith leave only the cakes of the same type. How many kokosek, laskonek and caramel c
  3. Salary raise
    euro The monthly salary was 620 Eur. During the year it was raised to 727 Eur. Calculate the month from salary was increased that employee earned 7547 Eur during the whole year.
  4. Mushrooms from the forest
    dubak Magda and Tereza goes to pick mushrooms. Total found 70 mushrooms. Magda found that between fungi found 5/9 bedel. Tereza discovered that she found among fungi are 2/17 champignons. How many mushrooms found Magda?
  5. Group
    deti_skupina Group of kids wanted to ride. When the children were divided into groups of 3 children 1 remain. When divided into groups of 4 children 1 remain. When divided into groups of 6 children 1 missed. After divided to groups of 5 children its OK. How many are t
  6. Rectangle
    rectangles_1 The perimeter of the rectangle is 22 cm and content area 30 cm2. Determine its dimensions, if the length of the sides of the rectangle in centimeters is expressed by integers.
  7. Basements
    Spider-and-Fly In the first basement is more flies than the spiders, the second vice versa. Each basement had spiders and flies together 100 feet. Determine how many could be flies and spiders in the first and second basement. PS. We only need, when you write how many.
  8. Package
    latky_textil The package has no more than 67 m of cloth. If we just cut it all on the blouses or all on dresses, no cloth left remain. On the one blouse consumes 3.8 m of cloth and on one dress 1.7 m. Determine the amount of the cloth in the package.
  9. Bicycles
    cyclist_11 You're the owner of the transport 's learning playground. Buy bicycles of two colors but you've got to spend accurately 120000 Kč. Blue bike costs 3600Kč and red bicycle 3200Kč.
  10. Digits A, B, C
    numbers_8 For the various digits A, B, C is true: the square root of the BC is equal to the A and sum B+C is equal to A. Calculate A + 2B + 3C. (BC is a two-digit number, not a product).
  11. Daughters
    family_3 The man conducting the census asks a woman to age of three daughters. Woman says when multiply the age getnumber 72; if their ages add up, get a number of our house, as you see. The man says: That is not enough to calculate their ages. She says: my oldes
  12. Friends
    friends2 Some friends had to collect the sum 72 EUR equally. If the three refused their part, others would have to give each 4 euros more. How many are friends?
  13. Cooks
    kucharky Four cooks cleaned 5 kg of potatoes for 10 minutes. How many cook would have to work clean 9 kg of potatoes for 12 minutes?
  14. Two friends
    beers Two friends met as a good man perish together for a beer. After recovery the most important topics (politics, women, football ...), one asks: - And how many do you have children? - I have 3 children. - And how many years have? Friend already not want to an
  15. Repairman
    makak Repairman has vowed to do repair work at the plant for 25 days. However work had to be shortened, and therefore he took helper worker. Together they made all the corrections for the whole days. How long it would take work to helper worker?
  16. Real estate
    house Residential house has three entrances numbered by odd numbers arithmetic progression. The sum of the two numbers on the corner entrances is 50. Calculate the highest of this three numbers.
  17. Sales of products
    cukriky_9 For 80 pieces of two quality products a total sales is 175 Eur. If the first quality product was sold for n EUR per piece (n natural number) and the second quality product after 2 EUR per piece. How many pieces of the first quality were sold?