[Euler] Add solution for #31.