Let $ a_1,a_2,...,a_n$ and $ b_1,b_2,...,b_n$ be positive integers such that any integer $ x$ satisfies at least one congruence $ x\equiv a_i\pmod {b_i}$ for some $ i$. Prove that there exists a nonempty subset $ I$ of $ \{1,2,...,n\}$ such that $ \sum_{i\in I}{\frac {1}{b_i}}$ is an integer. - (Problems from the book, chapter 17)
This is a solution I have found on AoPS:
Solution a la Vess: Consider $ \prod_j(e^{2\pi i\frac{x-a_j}{b_j}}-1)=\sum_I\pm e^{2\pi i (A_I x+B_I)}$. Looking at the left hand side, we see that its average over $ \mathbb Z$ (understood as $ \lim_{N\to\infty}\frac1{2N+1}\sum_{-N}^N$) is $ 0$. Looking at the right hand side, we see that if no $ A_I$ with $ I\ne\varnothing$ is an integer, then it is $ (-1)^n$.
Is this answer correct? If so, how can I understand this solution ? What is $A_I$ and $B_I$ ? Are there any other solutions for this problem ?