Sheep

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

Correct answer:

n =  119

Step-by-step explanation:

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 <<<<<<=====



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







Tips for related online calculators
Do you want to perform natural numbers division - find the quotient and remainder?

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

Related math problems and questions: