I have done some Euler problems. Only 20 or so. Your problem is a common one from what I've seen.

My approach was always do it first. If it takes longer than I'd expect then I would do as much...