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 linear equation or system of equations and looking for its solution? Or do you have quadratic equation? Looking for a statistical calculator? Looking for help with calculating arithmetic mean? Do you have a system of equations and looking for calculator system of linear equations?

Next similar examples:

  1. Expression with powers
    eq222_9 If x-1/x=5, find the value of x4+1/x4
  2. The room
    malovka_5 The room has a cuboid shape with dimensions: length 50m and width 60dm and height 300cm. Calculate how much this room will cost paint (floor is not painted) if the window and door area is 15% of the total area and 1m2 cost 15 euro.
  3. Normal distribution GPA
    normal_d_3 The average GPA is 2.78 with a standard deviation of 4.5. What are students in the bottom the 20% having what GPA?
  4. Candy and boxes
    cukriky_13 We have some number of candy and empty boxes. When we put candies in boxes of ten, there will be 2 candies and 8 empty boxes left, when of eight, there will be 6 candies and 3 boxes left. How many candy and empty boxes left when we put candies in boxes of.
  5. Cancel fractions
    zlomky_15 Compress the expression of factorial: (n+6)!/(n+4)!-n!/(n-2)!
  6. Geometric progression
    exp_1 In geometric progression, a1 = 7, q = 5. Find the condition for n to sum first n members is: sn≤217.
  7. Ratio of sides
    trojuholnik_5 The triangle has a circumference of 21 cm and the length of its sides is in a ratio of 6: 5: 3. Find the length of the longest side of the triangle in cm.
  8. Alice
    usd_10 Alice spent 5/11 of her money on a back pack. She has $42 dollars left. How much was her back pack?
  9. A triangle
    triangle1_1 A triangle has an angle that is 63.1 other 2 are in ratio of 2:5 What are the measurements of the two angles?
  10. Speed of car
    autosalon_2 The car went to a city that was 240 km away. If his speed increased by 8 km/h, it would reach the finish one hour earlier. Determine its original speed.
  11. Two equations
    children_23 Solve equations (use adding and subtracting of linear equations): -4x+11y=5 6x-11y=-5
  12. A cylinder
    string A cylinder 108 cm high has a circumference of 24 cm. A string makes exactly 6 complete turns around the cylinder while its two ends touch the cylinder's top and bottom. (forming a spiral around the cylinder). How long is the string in cm?
  13. Evaluation of expressions
    eq222_10 If a2-3a+1=0, find (i)a2+1/a2 (ii) a3+1/a3
  14. Cube, cuboid, and sphere
    cubes3_8 Volumes of a cube and a cuboid are in ratio 3: 2. Volumes of sphere and cuboid are in ratio 1: 3. In what ratio are the volumes of cube, cuboid, and sphere?
  15. Hypotenuse - RT
    triangle_bac_1 A triangle has a hypotenuse of 55 and an altitude to the hypotenuse of 33. What is the area of the triangle?
  16. Overload
    aircraft-02_10 What overload in g (g-force) has passed the pilot if he accelerated from 0 to 600 km/h in 3 seconds?
  17. Right angled triangle 3
    right_triangle_3 Side b = 1.5, hypotenuse angle A = 70 degrees, Angle B = 20 degrees