I had a very fun night of trying to brute force an unsolved problem in mathematics, the Magic Square of Squares. I leaped into the code and got 4 hours into optimizing it... Before realizing my search space was in the nonillions, and there's some geometric proof that it's impossible. Ah well.