Count Integer Pairs Satisfying 1/x + 1/y = 1/N!
Company: Point72
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Other
Overview: Count the ordered pairs of positive integers x and y that satisfy 1/x + 1/y = 1/n! for n up to one million, with the count returned modulo 10^9 + 7. It tests rearranging a Diophantine equation, reasoning about the prime factorization of a factorial, and keeping the work far below the size of n!.