Project Euler 124(2)

Problem 124

もっと速い方法を考えましょう。

10万で9ms、1000万で1.1sでした。