My solution for Euler project