# Problem 1 [Problem 1 link](https://projecteuler.net/problem=1) For the solution 2, it is based on the [inclusion–exclusion principle](https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle), which in its simplest form says that the number of elements in the union of two finite sets equals the sum of the number of the two sets subtract the number of elements in the intersection of the two sets. ```{math} \left| A \bigcup B \right| = \left| A \right| + \left| B \right| - \left| A \bigcap B \right| ``` ```{literalinclude} ../../solution/problem1.py ```