邮票凑数
Stamp Sum
题目详情
你有无限多张面值为 5 与 21 的邮票。问:不能表示为这两种邮票线性组合的最大金额是多少?
You possess an infinite supply of stamps valued at and . What is the highest value that cannot be represented as a combination of these stamps?
解析
由于 ,不能表示的最大数为 Frobenius 数:
因此最大不能凑出的金额是 79。
Original Explanation
The values , , , and are the smallest numbers equivalent to , , , and modulo , respectively. By adding multiples of to these values, we can create any number equivalent to those in modulo . The largest value that cannot be formed is the highest number that is modulo , which is . Thus, is the largest integer we cannot create.