Problem

Source: Russian TST 2020, Day 6 P1

Tags: combinatorics, number theory



There are coins worth $1, 2, \ldots , b$ rubles, blue bills with worth $a{}$ rubles and red bills worth $a + b$ rubles. Ilya wants to exchange a certain amount into coins and blue bills, and use no more than $a-1$ coins. Pasha wants to exchange the same amount in coins and red bills, but use no more than $a{}$ coins. Prove that they have equally many ways of doing so.