Target

Peter, Martin and Jirka were fire in a special target, which had only three fields with values of 12, 18 and 30 points. All boys were firing with the same number of arrows and all the arrows hit the target, and the results of every two boys differed in one point.

Peter's average score was two points better than Martin's and Martin was one point better than Jirka's average.

Find how many arrows each of the boys fired.


Result

n =  6

Solution:

Peter: 30 30 30 30 30 30; AVG = 30
Martin: 30 30 30 30 30 18; AVG = 28
Jirka: 30 30 30 30 30 12; AVG = 27

Program in PHP:
$x = array(12,18,30);
$ch = array();
for($n=1;$n<1000;$n++)
{
    foreach($x AS $xx)
    {
        $ch[0][$n] = $xx;

        foreach($x AS $yy)
        {
            $ch[1][$n] = $yy;
            foreach($x AS $zz)
            {
                $ch[2][$n] = $zz;

                $s0 = array_sum($ch[0]);
                $s1 = array_sum($ch[1]);
                $s2 = array_sum($ch[2]);

                if($s0/$n != 2+$s1/$n || $s1/$n != 1 + $s2/$n)
                {
                    continue;
                }

                echo($n);
                print_r($ch);

            }
         }
    }

}








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




To solve this example are needed these knowledge from mathematics:

Looking for help with calculating arithmetic mean? Looking for a statistical calculator? Do you have a linear equation or system of equations and looking for its solution? Or do you have quadratic equation?

Next similar examples:

  1. Tabitha
    factory_butter_7 Tabitha manufactures a product that sells very well. The capacity of her facility is 241,000 units per year. The fixed costs are $122,000 per year and the variable costs are $11 per unit. The product currently sells for $17. a. What total revenue is requ
  2. Bonus
    moeny Gross wage was 527 EUR including 16% bonus. How many EUR were bonuses?
  3. Gasoline-oil ratio
    fuel-pump The manufacturer of a scooter engine recommends a gasoline-oil fuel mixture ratio of 15 to 1. In a particular garage, we can buy pure gasoline and a gasoline-oil mixture, which is 75% gasoline. How much gasoline and how much of the gasoline-oil mix do we
  4. Troops
    regiment Route is long 147 km and the first day first regiment went at an average speed 12 km/h and journey back 21 km/h. The second day went second regiment same route at an average speed 22 km/h there and back. Which regiment will take route longer?
  5. Equation with mixed fractions
    fractions 2 3/5 of 1430+? = 1900. How to do this problem
  6. Working alone
    workers Tom and Chandri are doing household chores. Chandri can do the work twice as fast as Tom. If they work together, they can finish the work in 5 hours. How long does it take Tom working alone to do the same work?
  7. One side
    angle_incline One side is 36 long with a 15° incline. What is the height at the end of that side?
  8. Intersect and conjuction
    venn_intersect Let U={1,2,3,4,5,6} A={1,3,5} B={2,4,6} C={3,6} Find the following. 1. )AUB 2. )A'UB'
  9. Car repair
    cars John bought a car for a certain sum of money. He spent 10% of the cost to repairs and sold the car for a profit of Rs. 11000. How much did he spend on repairs if he made a profit of 20%?
  10. Trapezoid MO
    right_trapezium The rectangular trapezoid ABCD with right angle at point B, |AC| = 12, |CD| = 8, diagonals are perpendicular to each other. Calculate the perimeter and area of ​​the trapezoid.
  11. Garden
    garden_1 Area of a square garden is 6/4 of triangle garden with sides 56 m, 35 m, and 35 m. How many meters of fencing need to fence a square garden?
  12. Pool
    pool If water flows into the pool by two inlets, fill the whole for 8 hours. The first inlet filled pool 6 hour longer than second. How long pool take to fill with two inlets separately?
  13. Right Δ
    ruler A right triangle has the length of one leg 28 cm and length of the hypotenuse 53 cm. Calculate the height of the triangle.
  14. Logic
    blue-barrel A man can drink a barrel of water for 26 days, woman for 48 days. How many days will a barrel last between them?
  15. TV transmitter
    praded 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.
  16. Beer
    piva After three 10° beers consumed in a short time there are 5.6 g of alcohol in 6 kg adult human blood. How much is it per mille?
  17. Cube in a sphere
    cube_in_sphere The cube is inscribed in a sphere with volume 9921 cm3. Determine the length of the edges of a cube.