projecteuler.net problem 21 solved in java