I'm totally lost and spent most of the weekend on this question, if anyone out there can help in anyway I would be most thankful.

Problem 101 - Project Euler