Project Euler 683

https://projecteuler.net/problem=683

115着。
特に難しいことは無い。
sが累積だったら多少難しくなるかもしれないが。