Nuts, girl and boys

Milena collected fallen nuts and called a bunch of boys let them share. She took a condition: the first boy takes one nut and tenth of the rest, the second takes 2 nuts and tenth new rest, the third takes 3 nuts and tenth new rest and so on. Thus managed to distribute all the nuts and everyone got same amounth.

Determine how many nuts gathered Milena and many boys divided the nuts.

Correct answer:

nuts:  81
boys:  9

Step-by-step explanation:

Program in PHP:
for($o=2;$o<1000; $o++)
{
    $oo = $o;
    $ch = 1;

    $stack = array();
    do
    {
        $d = $ch + ($oo-$ch)/10;
        if($d != (int)$d)
        {
           continue(2);
        }
        $oo -= $d;
        $ch++;
        $stack[] = $d;
    }while($oo>0);

    if($oo==0)
    {
        echo "nuts=$o boys=$ch";
        print_r($stack);
        exit;
    }
}




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



avatar







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

Related math problems and questions:

  • Squirrels
    Squirrel The squirrels discovered a bush with hazelnuts. The first squirrel plucked one nut, the second squirrel two nuts, the third squirrel three nuts. Each new squirrel always tore one nut more than the previous squirrel. When they plucked all the nuts from the
  • Three drivers
    gas_car Three driversdriving the same direction found that they have same amounth of gasoline. The first is enough to go 6 km, 4 km second and third 3km. Gasoline they divided so all three just drove to the nearest petrol station. How many km away was a petrol st
  • Walnuts
    orechy x walnuts were in the mission. Dano took 1/4 of nuts Michael took 1/8 from the rest and John took 34 nuts. It stayed here 29 nuts. Determine the original number of nuts.
  • Coal storage
    sklady The coal storage distribute received coal shipment within three days. The first day distribute third of the shipments, the second day of two-fifths of the rest and the third day 300 tons of coal. How many tons of coal distributed first and second day?
  • Pairs
    dvojice From the five girls and four boys teachers have to choose one pair of boy and girl. A) How many such pairs of (M + F)? B) How many pairs where only boys (M + M)? C) How many are all possible pairs?
  • Z9-I-4
    numbers Kate thought a five-digit integer. She wrote the sum of this number and its half at the first line to the workbook. On the second line wrote a total of this number and its one fifth. On the third row, she wrote a sum of this number and its one nines. Fina
  • Three numbers
    dices2 We have three different non-zero digits. We will create all 3 digits numbers from them to use all 3 figures in each number. We add all the created numbers, and we get the sum of 1554. What were the numbers?
  • Alloy
    hlinik_slitina The first alloy is a mixture of two metals in the ratio 1:2, the second is a mixture of same metals in the ratio 2:3. At what ratio we have these two alloys put into the furnace to obtain a new metal alloy with ratio 17:27? (All three ratios correspond to
  • Ravens
    havrany On two trees sitting 17 ravens. If 3 ravens flew from first to second tree and 5 ravens took off from second tree then the first tree has 2 times more ravens than second tree. How many ravens was originally on every tree?
  • Symmetry
    numbers3 Eva loves symmetry in shapes and numbers. Yesterday she invented a completely new kind of symmetry - divisible symmetry. She wrote all five-digit numbers with different digits with the following property: the first digit is divisible by 1, the second by 2
  • The nuts
    oriesky There are 159 nuts in two bags, 15 more in the first than in the second, how many nuts are in the bags?
  • Three friends
    money Three friends divided the profit by 104,650 CZK, so that for every 4 CZK, which got the first friend equals 5 crowns for second and for every 9 CZK, which got the second equals 16 CZK for third. Question: Who got the most and how much.
  • 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.
  • Four-digit numbers
    numberline Find four-digit numbers where all the digits are different. For numbers, the sum of the third and fourth digits is twice the sum of the first two digits, and the sum of the first and fourth digits is equal to the sum of the second and third digits. The di
  • Two cars on ring
    two_cars There were two cars on the round track (ring) in the adjacent tracks, the first car in the inner track, the second in the outer track. Both cars started at the same time from one starting track. The first toy car drove every four laps simultaneously as th
  • Toy cars
    numbers2 Pavel has a collection of toy cars. He wanted to regroup them. But in the division in groups of three, four, six, and eight, he was always one left. Only when he formed groups of seven, he divided everyone. How many toy cars have in the collection?
  • Girls
    skola The boys and girls in the class formed groups without the rest of the fives, two girls and three boys. There are six girls missing to create mixed pairs (1 boy and one girl). How many girls are in the classroom?