changed type of begin from double to long, slightly faster
Optimized Problem15 with new method, approximately 5 minutes to compute