solved problems on projecteuler.net with JavaScript