2023 WSMO Team Round Problems/Problem 1

Problem

Bob has a number of pencils. When Bob splits them into groups of 10, he has 3 left over. When he splits them into groups of 12, he has 5 left over. Find the smallest number of pencils Bob can have.

Solution