Rating:

Theoretically easy, actually quite complicated, ppc challenge

[Full writeup with code and explanation](https://theromanxpl0it.github.io/ctf_n1ctf18/2018/03/12/mathgame.html)

Original writeup (https://theromanxpl0it.github.io/ctf_n1ctf18/2018/03/12/mathgame.html).