仅由 0/1 组成的最小 15 的倍数
Least Multiple of 15
题目详情
求最小的正整数,它是 15 的倍数,且十进制各位只由 0 和 1 组成。
What is the least positive multiple of 15 whose digits consist of 1's and 0's only?
解析
要被 15 整除需同时被 3 与 5 整除。
- 被 5 整除:末位必须为 0(因为不能出现 5)。
- 被 3 整除:各位数字和必须是 3 的倍数。因为只含 0/1,所以等价于“1 的个数是 3 的倍数”。
最小满足条件的数为 。
Original Explanation
In order for a number to be a multiple of 15, it must be perfectly divisible by both 3 and 5. In order for the number to be divisible by 5, it must end in either a 0 or 5—thus, our number must end in a 0. In order for the number to be divisible by 3, the sum of its digits must be a multiple of 3—thus, we will add three 1's digits to the number. Hence, the smallest positive multiple of 15 whose digits consist of 1's and 0's only is 1110.