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:

Do you have a system of equations and looking for calculator system of linear equations? Looking for a statistical calculator? Looking for help with calculating arithmetic mean?

Next similar examples:

  1. Nuts
    orechy Peter has 49 nuts. Walnuts have 3 more than hazelnuts and hazelnut 2 over almonds. Determine the number of wallnuts, almonds and hazelnuts.
  2. Men, women and children
    regiojet On the trip went men, women and children in the ratio 2:3:5 by bus. Children pay 60 crowns and adults 150. How many women were on the bus when a bus was paid 4,200 crowns?
  3. Median and modus
    dice_3 Radka made 50 throws with a dice. The table saw fit individual dice's wall frequency: Wall Number: 1 2 3 4 5 6 frequency: 8 7 5 11 6 13 Calculate the modus and median of the wall numbers that Radka fell.
  4. 75th percentile (quartille Q3)
    statistics Find 75th percentile for 30,42,42,46,46,46,50,50,54
  5. Linsys2
    linear_eq_3 Solve two equations with two unknowns: 400x+120y=147.2 350x+200y=144
  6. Theorem prove
    thales_1 We want to prove the sentense: If the natural number n is divisible by six, then n is divisible by three. From what assumption we started?
  7. Ball game
    lopta_3 Richard, Denis and Denise together scored 932 goals. Denis scored 4 goals over Denise but Denis scored 24 goals less than Richard. Determine the number of goals for each player.
  8. Average
    chart If the average(arithmetic mean) of three numbers x,y,z is 50. What is the average of there numbers (3x +10), (3y +10), (3z+10) ?
  9. Elimination method
    rovnice_1 Solve system of linear equations by elimination method: 5/2x + 3/5y= 4/15 1/2x + 2/5y= 2/15
  10. Three workshops
    workers_24 There are 2743 people working in three workshops. In the second workshop works 140 people more than in the first and in third works 4.2 times more than the second one. How many people work in each workshop?
  11. Team
    football The football team has 11 players. Their average age is 20 years. During the match due to injury, one player withdraws and the average age of the team is 18. How old was injured player?
  12. Average age
    candles_1 The company of five people has an average age of 46 years. The average age of the first four is 43 years. How many years has the fifth member of this company?
  13. Difference of two number
    squares2_6 The difference of two numbers is 20. They are positive integers greater than zero. The first number raised to one-half equals the second number. Determine the two numbers.
  14. Lord Ram
    sheep When lord Ram founded the breed white sheep was 8 more than black. Currently white sheep are four times higher than at the beginning and black three times more than at the beginning. White sheep is now 42 more than the black. How many white and black sh
  15. Book
    books_1 Alena read a book at speed 15 pages per day. If she read twice as fast she should read a book four days earlier. How many pages have a book?
  16. Cans
    konzervy How many cans must be put in the bottom row if we want 182 cans arrange in 13 rows above so that each subsequent row has always been one tin less? How many cans will be in the top row?
  17. Mean
    integrales if the mean of the set of data 5, 17, 19, 14, 15, 17, 7, 11, 16, 19, 5, 5, 10, 8, 13, 14, 4, 2, 17, 11, x is -91.74, what is the value of x?