Sheep

Shepherd tending the sheep. Tourists asked him how much they have. The shepherd said, "there are fewer than 500. If I them lined up in 4-row 3 remain. If in 5-row 4 remain. If in 6-row 5 remain. But I can form 7-row." How many sheep have herdsman?

Correct result:

n =  119

Solution:

a%b = a modulo b

n=7: n%4=3, n%5=2, n%6=1, n%7=0
n=14: n%4=2, n%5=4, n%6=2, n%7=0
n=21: n%4=1, n%5=1, n%6=3, n%7=0
n=28: n%4=0, n%5=3, n%6=4, n%7=0
n=35: n%4=3, n%5=0, n%6=5, n%7=0
n=42: n%4=2, n%5=2, n%6=0, n%7=0
n=49: n%4=1, n%5=4, n%6=1, n%7=0
n=56: n%4=0, n%5=1, n%6=2, n%7=0
n=63: n%4=3, n%5=3, n%6=3, n%7=0
n=70: n%4=2, n%5=0, n%6=4, n%7=0
n=77: n%4=1, n%5=2, n%6=5, n%7=0
n=84: n%4=0, n%5=4, n%6=0, n%7=0
n=91: n%4=3, n%5=1, n%6=1, n%7=0
n=98: n%4=2, n%5=3, n%6=2, n%7=0
n=105: n%4=1, n%5=0, n%6=3, n%7=0
n=112: n%4=0, n%5=2, n%6=4, n%7=0
n=119: n%4=3, n%5=4, n%6=5, n%7=0 <<<<<<=====



Our examples were largely sent or created by pupils and students themselves. Therefore, we would be pleased if you could send us any errors you found, spelling mistakes, or rephasing the example. Thank you!


Leave us a comment of this math problem and its solution (i.e. if it is still somewhat unclear...):

Showing 0 comments:
1st comment
Be the first to comment!
avatar




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

Next similar math problems:

  • Red and white
    tulipany Simona picked 63 tulips in the garden and tied bicolor bouquets for her girlfriends. The tulips were only red and white. She put as many tulips in each bouquet, three of which were always red. How much could Simon tear off white tulips? Write all the opti
  • Children
    car_game Less than 20 children is played various games on the yard. They can create a pairs, triso and quartets. How many children were in the yard when Annie came to them?
  • Intelligence test
    test Paľo, Jano, Karol, and Rišo were doing an intelligence test. Palo correctly answered half of the questions plus 7 questions, Jano to a third plus 18 questions, Karol to a quarter plus 21 questions and Risho to a fifth plus 25 questions. After the test, K
  • Basket of fruit
    hrusky_jablka In six baskets, the seller has fruit. In individual baskets, there are only apples or just pears with the following number of fruits: 5,6,12,14,23 and 29. "If I sell this basket," the salesman thinks, "then I will have just as many apples as a pear." Whic
  • Toy cars
    numbers2_13 Pavel has a collection of toy cars. He wanted to regroup them. But in the division 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?
  • Candies
    bonbon If Alena give Lenka 3 candy will still have 1 more candy. If Lenka give Alena 1 candy Alena will hame twice more than Lenka. How many candies have each of them?
  • Quiz or test
    test_2 I have a quiz with 20 questions. Each question has 4 multiple choice answers, A, B, C, D. THERE IS NO WAY TO KNOW THE CORRECT ANSWER OF ANY GIVEN QUESTION, but the answers are static, in that if the "correct" answer to #1 = C, then it will always be equal
  • Odd/even number
    numbers2_49 Pick any number. If that number is even, divide it by 2. If it's odd, multiply it by 3 and add 1. Now repeat the process with your new number. If you keep going, you'll eventually end up at 1. Every time. Prove. ..
  • Nuts, girl and boys
    orechy_nuts 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
  • Divisors
    one Find all divisors of number 493. How many are them?
  • Three-digit integers
    numbers2_49 How many three-digit natural numbers exist that do not contain zero and are divisible by five?
  • Repair company
    servis The company repairs cars. The first day repair half of the contract second day, the half of the rest and third day 8 residue cars. How many total cars company repaired?
  • Hexagon = 8 parts
    stef.6.11.99 Divide the regular hexagon into eight equal parts.
  • Remainder
    numbers2_35 A is an arbitrary integer that gives remainder 1 in the division with 6. B is an arbitrary integer that gives remainder 2 the division by. What makes remainder in division by 3 product of numbers A x B ?
  • Divisibility
    numbers_29 Write all the integers x divisible by seven and eight at the same time for which the following applies: 100
  • Divisors
    divisors The sum of all divisors unknown odd number is 2112. Determine sum of all divisors of number which is twice of unknown numbers.
  • Unknown number
    unknown Unknown number is divisible by exactly three different primes. When we compare these primes in ascending order, the following applies: • Difference first and second prime number is half the difference between the third and second prime numbers. • The prod