Problem 26; Add core main for debugging
Problem 27 brute force
Problem 27 optimizations
Problem 27 slight optimization