Precomputed values are a good option for the hard problem. I found it a little boring though.