Deer in the City

Now there are 100 deer [being distributed] in a city. If one household has one deer there is a remainder, and if the remainder is again distributed such that every three households share a deer, then nothing is left. Find the number of households in the city.

Sunzi suan jing (Mathematical Classic of Master Sun), Sunzi, c. 400 CE

Click here to reveal the answer