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. Monkey
    monkey Monkey fell in 23 meters deep well. Every day it climbs 3 meters, at night it dropped back by 2 m. On what day it gets out from the well?
  2. Expression plus minus
    numbers_49 Evaluate expression: (-1)2 . 12 – 6 : 3 + (-3) . (-2) + 22 – (-3) . 2
  3. Dozen
    plusminus_13 What is the product of 26 and 5? Write the answer in Arabic numeral. Add up the digits. How many of this is in a dozen? Divide #114 by this
  4. The temperature
    teplomer_26 The temperature at 1:00 was 10 F. Between 1:00 and 2:00, the temperature dropped 15F. Between 2:00 and 3:00, the temperature rose 3F. What is the temperature at 3:00?
  5. Divisibility
    divisibility Is the number 761082 exactly divisible by 9? (the result is the integer and/or remainder is zero)
  6. Chickens and rabbits
    pipky In the yard were chickens and rabbits. They had 28 heads and 82 legs. How many chickens and how many rabbits was in the yard?
  7. Cats
    cats Two cats caught two mice in two days. How many mouses will catch 6 cats for 6 days?
  8. When will I be a millionaire?
    milionar_kedy Shawn monthly send 220 euros to the bank, which he deposits bear interest of 2.4% p.a. Calculate how many months must Shawn save to save 1000000 euros? Inflation, interest rate changes or bank failures ignore.
  9. Diofant 2
    1diofantos Is equation ? solvable on the set of integers Z?
  10. Trio
    3Soldiers 56 children lined up in groups of three. How many children did not create a trio?
  11. Diofant equation
    diofantos In the set of integers (Z) solve the equation: ? Write result with integer parameter ? (parameter t = ...-2,-1,0,1,2,3... if equation has infinitely many solutions)
  12. Report card
    vysvedcenie_1 Ivor hit 5× grade 5 at the beginning of the school year. How many times must now catch grade 1 to get grade 2 on report card?
  13. Unknown x
    UnknownX If we add to unknown number 21, then divide by 6 and then subtract 51, we get back an unknown number. What is this unknown number?
  14. Dice
    dices How many times must throw the dice, the probability of throwing at least one six was greater than 90%?
  15. Sequence
    arithmetic_seq In the arithmetic sequence is a1=-1, d=4. Which member is equal to the number 203?
  16. Mistake
    minus Nicol mistake when calculate in school. Instead of add number 20 subtract it. What is the difference between the result and the right result?
  17. Father and son
    father_son Father and son are together 80 years. Son is 28 years younger than father. How old is the son?