Click here to read the complete problem statement.
Recipe for solving this
Inclusion Exclusion is the way,
- Count combinations without restrictions with stars and bars
- Minus if x divides, \times 3 (why? something to do with symmetry)
- Plus if x, y both divides
- NO INTERSECTION
- Don’t be sad, it took me a solid 15 minutes and 3 failed attempts to figure this out