Project Euler #136: Singleton difference

  • + 0 comments

    With a bit of math (modular arithmetic), you can restrict solutions only to some particular values of n, and with a limited range for the variables, so you can check all solutions (for uniqueness) within the required boundary range in a reasonable time.