Comments
On 055D → Codeforces Round #821 (Div. 2), 4 years ago
0

In B, there will always be at least 1 player with 0 win and at least 1 player with 1 win. So exactly one of x and y will have to be 0 and other one will have to be a divisor of n — 1, since there are n — 1 games. Figure out the rest.

Yes, I understand now. I tried to formulate it using the inclusion-exclusion principle, but I was somehow stuck.
Thanks for those blog links.

Yep, I know the offline solution.
Thanks a lot!