Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

number theory intermediate

Problem

Alex is at the candy store buying jellybeans. He wants to buy at least 100 jellybeans. He wants to buy the least amount such that he would have exactly leftover after dividing the jellybeans evenly among people. How many jellybeans should Alex buy?
Solution
Alex wants a remainder of after he divides the number of jellybeans he buys by . When you divide by , you get with a remainder of . Since Alex wants jellybeans left over, he should buy more than . Therefore, he should buy jellybeans.
Final answer
102