Target

Peter, Martin, and Jirka were a fire in a particular target, with 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 by 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.

Correct answer:

n =  6

Step-by-step explanation:

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);

            }
         }
    }

}




Did you find an error or inaccuracy? Feel free to write us. Thank you!







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

You need to know the following knowledge to solve this word math problem:

Related math problems and questions: